Number of neutrino families from Z decays:

Indirect method (lineshape):
Assuming lepton universality:
Γinvtothad-3*Γll
Assuming the validity of SM, NνinvνSM; this can be rewritten:
Nν=(Γinvll)*(ΓllνSM).
Model dependence: one uses the SM to calculate the second ratio (ΓllνSM). In this ratio, the systematics cancel better than in choosing the hadronic width instead of the leptonic one (since one would have the QCD corrections).
So, one has to measure Γll and Γinv.
The lineshape fit gives MZ, Γtot, σ0had (hadronic cross section at the peak) and Rlhadll.
The biggest uncertainty on Nν comes from the uncertainty on σ0had, which in turn comes mainly from the luminosity uncertainty; the final precision on Nν was better than in the original LEP proposals, thanks to second-generation Si luminometers.
Remaining major contribution comes from the theoretical error on Bhabha scattering.

Direct method (ννγ), also called "neutrino counting":
One counts events of the kind e+e- -> γ+nothing, which have very little background in the SM. A non-Z contribution to the signal (a few %) comes from ννγ final state coming from an intermediate W exchange between electrons.
The measurement is optimally carried out at energies a few GeV above the Z mass, where initial state photon radiation brings the e+e- center of mass energy down to the Z resonance.
Main background comes from the radiative Bhabha scattering when both electrons escape detection in the beam pipe or in some inactive region. To reduce it, only the central part of the EM calorimeter is used. (Extending the photon acceptance increases the statistics but to control the background also the electron acceptance has to be increased to very low angles.)
Another background is given by cosmics. This is reduced by requiring the photon to come from the vertex.
To study the uncertainty on the trigger (and offline cuts) efficiency, which is one of the main systematics, it's useful to select (with an independent track trigger) the single-electron events coming from inverse Compton scattering: topology is the same as the signal (except for a charged track) and the cross section is 10 times the signal.

At hadron colliders:
Ratio of W->lν to Z->ll.
Standard Model (SM) values for the W total width and the ratio of W to Z leptonic widths are assumed.
Precision was limited both by statistics and knowledge of production cross sections.

Limit from cosmology:
Big bang production of helium increases with the number of massless neutrino species.
More ν generations means more density and an earlier decoupling time, the time when nuclear reactions are no longer efficient and neutrons only decay. Consequently, the number of neutrons is higher at nucleosynthesis time and so helium production is higher.