A widely used definition (see e.g. Wikipedia for a summery) of the number of particle ‘flavors’ in the SM is 6: 3 particle mass copies (e. g. electron, muon, tau for charged leptons; u, c, t for up-quarks …) doubled by the two up- and down- states.
Flavor is still a mystery in the SM. Historical Rabi’s quip “Who ordered the muon?” is steel urgent now for the three flavor mass copies of elementary particles.
But with the definition of 6 flavors this statement leads to confusion not welcome in physics. Indeed, because the SM is well theoretically defined by spontaneous violation of the gauged SU(2)x(1) symmetry, there is already a physical definition of the up and down states in theory as the two (+, - ½) projections of the particle weak isotopic spin; and the up and down states differ by 1 unit of electric charge.
On the other side, 3 physical states of a particle that differ only by mass values with all other quantities being identical ‘3 mass copies’ represent a basically new empirical quantity in physics that must be denoted by a new term.
The real mystery in SM is the origin of particle mass copies, certainly not the up and down states. Thus it seems very natural to restrict the term “flavor” in the SM to the new quality of 3 mass copies of quarks and leptons.
Another ground for that new flavor number definition is that in the SM weak interactions the 3 mass copies of quarks and leptons, not the six ones, are mixed (‘mixed flavor states’ participate in the weak interactions). The known 3 mixing angles are equal to the three flavor mass copies. It should be noted that only in case of three flavors the numbers of mixing angles and flavors are equal. Occam’s razor is here useful indeed.