How Does Cosmology Constrain the Number of Neutrino Species? I know that based upon theories of structure formation cosmologists can constrain the sum of the masses of neutrinos - if neutrinos were too light or too heavy it would simply change the power spectrum of the universe. 
My question is how exactly is the number of neutrino species constrained by cosmological measurements (i.e. - $N_{eff}$ as measured by WMAP or Planck)? The recent results from the Planck Satellite give us $3.3\pm0.3$, which is consistent with three neutrino species. How is this measured?
 A: There are two aspects to your question: the number of neutrino species and the sum of neutrino masses. These two aspects reflect the unusual property of neutrinos: on the one hand, cosmic neutrinos move at relativistic speeds and in the early universe they have very high momenta. This means that high-energy cosmic neutrinos behave much like photons, in particular when the universe was very young. On the other hand, they have a small non-zero rest-mass, so they also contribute to the matter content of the universe, along with baryons and dark matter.
So neutrinos have both radiation-like and matter-like properties, and these two properties are split up: the energy of neutrinos due to their momentum (let's call this $\rho_\nu$) is added to the energy of the photons, while their energy due to their rest-mass (let's call this $\rho_n$) is added to the matter content. Consider the expansion rate of the universe:
$$
H(a) = H_0\sqrt{\Omega_{R,0}a^{-4} + \Omega_{M,0}a^{-3} + \Omega_{K,0}a^{-2} + \Omega_{\Lambda,0}}.
$$
So we have
$$
\begin{align}
\Omega_{R,0} &= (\rho_{\gamma,0}+\rho_{\nu,0})/\rho_{c,0},\\
\Omega_{M,0} &= (\rho_{b,0}+ \rho_{d,0} + \rho_{n,0})/\rho_{c,0},
\end{align}
$$
where the subscripts $\gamma,b,d,c$ denote photons, baryons, dark matter, and the present-day critical density respectively. Additionally, the subscript 0 denotes present day quantities. I should confess that I never quite understood why it is justified to split up these two aspects of neutrinos like this, but that's how cosmologists seem to address the issue.
Now, the number of neutrino species directly determines the neutrino radiation density. Also, this radiation density was dominant during the early universe (roughly when the universe was less than 50,000 years old), when the scale factor $a$ was very small and the temperature was very high. The higher the neutrino radiation density, the higher the expansion rate of the early universe, and this has an impact on the propagation of temperature fluctuations in the early universe (the acoustic horizon). Since $\rho_\gamma$ can be directly calculated from the total Planck spectrum of the CMB, the result is that $\rho_\nu$ can be determined from the location of the acoustic peaks in the CMB:
 
The rest-mass energy of neutrinos has a different effect. First of all, baryons, dark matter and neutrinos have discernible properties: in the early universe, dark matter and ordinary matter accumulated into local potential wells, but neutrinos didn't because they were too energetic. In addition, baryons are hindered by radiation pressure, while dark matter isn't. Therefore, baryon and dark matter densities can be determined independently from the neutrino density (in particular, from the relative heights of the second and third acoustic peak). 
Once the amount of baryons and dark matter is known, the rest-mass neutrino density can then in turn be derived from the total matter density $\Omega_{M,0}$. This matter density becomes the dominant term in the expansion of the universe after 50,000 years and remains the dominant term for billions of years, until dark energy becomes dominant. In other words, the higher the neutrino mass, the higher the total matter density, and the higher the expansion rate of the universe at intermediate age, in particular right after photons and matter decouple. A higher expansion rate suppresses large-scale structure formation in the first few million years, and this in turn has an influence of the gravitational redshift of CMB photons as they pass through these potential wells. This redshift is called the Integrated Sachs-Wolfe Effect, and can also be derived from the CMB spectrum (notably around the first peak).
In summary, the number of neutrino species is derived from the cosmic radiation density, while the total mass of these neutrinos is derived from the cosmic matter density.
