Number $g(T)$ of relativistic degrees of freedom as a function of temperature $T$ Let us consider the total number of relativistic degrees of freedom $g(T)$ for particle species in our universe:
$$g(T)=\left(\sum_Bg_B\right)+\frac{7}{8}\left(\sum_Fg_F\right)$$
Where the sums are over the degrees of freedom for bosons ($B$) and and fermions ($F$) which are relativistic when the universe has temperature $T$ (meaning $T$ > their mass energy). For example the photon contributes a $g_{ph}=2$ for the two polarization degrees of freedom it has.
Now, I heard of the following rough estimates for $g(T)$:

When $T_1\geq 1GeV$ we have $g(T_1)\approx 100$.
When $100MeV\geq T_2\geq 1MeV$ we have $g(T_2)\approx 10$.
When $ 0.1MeV\geq T_3 $ we have $g(T_3)\approx 3$.

I am trying to reproduce these estimates by counting all relativistic particles at the specific $T$ values and summing up their degrees of freedom. However, there seem to be contradictions and unclarities here.
For example, the lowest of the three values $g(T_3)\approx3$ is supposedly due to the 2 polarizations of photons and 1 spin degree of freedom of the electron neutrino. However, shouldn't we also count the spin degree of freedom of the electron anti-neutrino? And what about the other two neutrino species? Why include electron neutrino but leave out the others?
Similarly, for $g(T_2)\approx 10$ I would expect to count 2 photon polarizations, 1 spin d.o.f. for neutrinos and anti-neutrinos (6 d.o.f.s in total), 2 spins for electrons and anti-electrons and muons and anti-muons (8 in total), again 2 spins for up, down and strange quark particle anti-particle pairs (12 in total). I am not sure if I missed any particle species here, but we already have $g(T_2)\approx30$ instead of $10$.
Could someone explain to me how to do this counting properly and why some species appear to be missing from consideration even though they should count as relativistic?
 A: First, note that the equation you use is only valid when all relativistic particles are in thermal equilibrium. The more general equation, which allows for particles with different temperatures, is
$$
g(T) = \sum_B g_B\left(\frac{T_B}{T}\right)^4 + \frac{7}{8}\sum_F g_F\left(\frac{T_F}{T}\right)^4
$$
where $T$ is the photon temperature and $T_B$, $T_F$ are the temperatures of each boson and fermion.
The degrees of freedom for all Standard Model particles are listed in the table below (source: http://www.helsinki.fi/~hkurkisu/cosmology/Cosmo6.pdf):

At temperatures $T\sim 200\;\text{GeV}$, all particles are present, relativistic, and in thermal equilibrium, so we find
$$
g(T) = 28 + \frac{7}{8}\cdot 90 = 106.75
$$
When $T\sim 1\;\text{GeV}$, the temperature has dropped below the rest energy of the $t$, $b$, $c$, $\tau$, $W^+$, $W^-$, $Z^0$, and $H^0$ particles, therefore these are no longer relativistic (and will have annihilated) and we have to take them out of the equation. We are left with
$$
g(T) = 18 + \frac{7}{8}\cdot 50 = 61.75
$$
When $T$ drops below $100\;\text{MeV}$, the remaining quarks and gluons are locked up in non-relativistic hadrons, and the muons have annihilated. All that's left are photons, electrons, positrons, neutrinos and anti-neutrinos, so that
$$
g(T) = 2 + \frac{7}{8}\cdot 10 = 10.75
$$ 
So far, all relativistic particles were in thermal equilibrium. However, as the temperature drops to $1\;\text{MeV}$, the neutrinos decouple and move freely, which means their temperature will start to diverge from the photon temperature. At $T < 500\;\text{keV}$, the electrons and positrons are no longer relativistic, so only the photons and neutrinos remain, and
$$
g(T) = 2 + \frac{7}{8}\cdot 6\left(\frac{T_\nu}{T}\right)^4,
$$
where $T_\nu$ is the neutrino temperature. Calculating this requires a bit of work. 
The Second Law of Thermodynamics implies that the entropy density $s(T)$ is given by
$$
s(T) = \frac{\rho(T) + P(T)}{T},
$$
where $\rho$ is the energy density and $P$ the pressure. Using the Fermi-Dirac and Bose-Einstein distributions, one finds that for relativistic particles
$$
\rho(T) = \begin{cases}
\dfrac{g_B}{2}a_B\, T^4&\text{bosons}\\
\dfrac{7g_F}{16}a_B\, T^4&\text{fermions}
\end{cases}
$$
and $P = \rho/3$, so that $s(T) = 4\rho(T)/3T$. Let us now consider the entropy density of the photons and the electrons and positrons at high temperatures, when they are still relativistic:
$$
s(T_\text{high}) = \frac{2}{3}a_B\,T_\text{high}^3\left(2 + \frac{7}{8}\cdot 4\right) =
\frac{4}{3}a_B\,T_\text{high}^3\left(\frac{11}{4}\right).
$$
At low temperatures, the electrons and positrons become non-relativistic, most annihilate and the remaining particles have negligible contribution to the entropy, therefore
$$
s(T_\text{low}) = \frac{4}{3}a_B\,T_\text{low}^3\,.
$$
However, thermal equilibrium implies that the entropy in a comoving volume remains constant:
$$
s(T)a^3 = \text{constant}.
$$
Also, the temperature of the neutrinos drops off as $T_\nu \sim 1/a$ after they decouple. Combining these results, we find
$$
\left(\frac{T_\text{low}}{T_{\nu,\text{low}}}\right)^3 = \frac{11}{4} \left(\frac{T_\text{high}}{T_{\nu,\text{high}}}\right)^3.
$$
At high temperatures, the neutrinos are still in thermal equilibrium with the photons, i.e. $T_{\nu,\text{high}}=T_\text{high}\,$, so finally we obtain
$$
T_\nu = \left(\frac{4}{11}\right)^{1/3}T
$$
at low temperatures. Therefore,
$$
g(T) = 2 + \frac{7}{8}\cdot 6\left(\frac{4}{11}\right)^{4/3} = 3.36.
$$
A more detailed treatment is given in the same link from where I took the table.
