A Baryon Number is the additive quantum number of a system.

It is defined as B = ⅓(n_{q} – n_{ q})

where n_{q} is the number of quarks and n_{ q} is the number of antiquarks.

The above table is for Mesons (pions and kaons).

Baryon Numbers for Quarks can be found here.