Light neutrino number from the invisible decay width of $Z$ boson, and precluding heavy neutrinos as dark matter candidate The $Z$ boson decays into pairs of quarks and leptons. While the decays to quarks pairs and charged lepton pairs can be observed, the decays to $\nu\bar\nu$ are cannot be. By subtracting the visible decay width $\Gamma_{\rm vis}$ of $Z$ from its total decay width $\Gamma_{\rm tot}$  the decay rate $\Gamma_{\rm inv}$ of $Z\rightarrow \nu\bar\nu$  can be obtained. It is found that $$\Gamma_{\rm inv}=\Gamma_{\rm tot}-\Gamma_{\rm vis}=498\pm 4.2{\rm MeV}.$$  Taking $\Gamma_{\nu\bar\nu}=166.9~ {\rm MeV}$ for a single neutrino pair, one finds that the number of neutrino species $N_\nu\simeq 3$. For a reference, see this review: Neutrino Physics by E. Akhmedov.
Questions 


*

*This calculation requires us to know $\Gamma_{\rm tot}$ and $\Gamma_{\rm vis}$ to determined $N_\nu$. $\Gamma_{\rm vis}$ can be measured through the decay rates to visible channels i.e. charged leptons and quarks. But how does obtain $\Gamma_{\rm tot}$? I think one can measure $\Gamma_{\rm tot}$ by measuring Z-boson lifetime but I am not sure. 

*Why is it assumed that $\Gamma_{\bar{\nu}\nu}=166.9$ MeV for a single neutrino pair? Where do we get this value from?

Update on 15.11.2018 
In Kolb and Turner's Early Universe it is mentioned that this determination of $N_\nu$ (i.e., number of light neutrinos) in this way precludes the possibility of a fourth generation of neutrino of mass less than about 45 GeV and eliminates the heavy neutrino as a dark matter candidate. This raises two more questions.


*How does it rule out the existence of a fourth generation of neutrino of mass less than 45 GeV but cannot rule out a neutrino of mass greater than 45 GeV?

*Also, how does this measurement rule out the heavy neutrinos as the dark matter candidate? 
 A: I assume you are asking a conceptual question, so I can be sloppy and schematic with numbers. So $\Gamma=2.5$GeV, etc...
I'll start with the pure theory, (2), part of your question. All partial widths of all SM decay modes are computable as per your favorite QFT text, at tree level to be schematically given by a concise WP table. Beyond an overall factor common to all modes, $O(G_F m_Z^3) \sim 1$GeV, their relative strengths are dictated just by the standard (and peculiar to the novice) coupling given in the PDG p2, 
$$
-\frac{g}{2\cos \theta_W} \sum _i \bar \psi _i (T_3(i) -2xQ(i) -T_3(i) \gamma^5                )\psi_i ~~Z_\mu ,
$$ 
where $x\equiv \sin^2 \theta_W$, and $T_3$ is the 3rd isospin component of the SM left doublet components, while Q is the charge of the component.  So the first and second lines of that table are straightforward: Each neutrino couples with $T_3=1/2$ and Q=0  purely by V-A, unsurprisingly. So the partial width of each neutrino species should go as the square of the coupling, $(1/2)^2$. 
By contrast, charged leptons couple with $T_3=-1/2, ~~ Q=-1$, so the amp coupling of V-A is (x-1/2) and of V+A just x : the 2 x of the vector coupling equipartitions itself to V-A and V+A . (Recall the celebrated freak result of the SM that, in the limit of the weak angle being 30°, x=1/4 so the charged lepton coupling is pure A. In the table, L+R vanishes.) Since the distinct alternative left and right chiral fermion decay modes do not interfere, the partial width is merely the sum of the squares of these two couplings, so $(x-1/2)^2+ x^2$.  
Consequently, for example, $\Gamma_{\nu_\mu\bar \nu_\mu} /\Gamma_{\mu\bar\mu} =1/(8x^2-4x+1)\approx 2$. You proceed to work out all mode partial widths for all fermions, and normalize them by their sum, Γ. You find that the leptons are minority participants in this, as, cf. the branching ratios  $\Gamma_{\nu_\mu\bar \nu_\mu} /\Gamma \approx 7$%,
and   $\Gamma_{ \mu\bar\mu} /\Gamma \approx 3.4$%, and so on. 7% of the theoretical total width is close to the accurate 167MeV cited above.
So much for theory. Experimentally, (1), you measure as many decay modes as you can find,  recalling the damning language loosely used. Γ ~ 1/τ is a width at half-maximum of each decay Breit-Wigner curve, or inverse lifetime, and a total decay rate. This, like the mass, is a feature of the decaying particle, the Z, but not of its particular decay modes: it includes all of them (think of a leaking tank with dozens of holes).
The partial widths Γi, however, are not real widths: they are only rates. Actually, they are branching ratios multiplied by the total width Γ  — recall our above theory discussion. The total width is some sophisticated average fit of the Breit-Wigner plots giving you an optimal handle  — with apologies to my cringing experimental colleagues. So you tally up counts (integrated rates) of all decay modes you can find. 
Having thus determined the visible  Γi s, you subtract their sum from the total Γ determined completely differently, to estimate the invisible decay rate. It is about 21% of the total width. This is just three times 7% , the above neutrino species BR. So three neutrino species will account for all invisible modes.


*

*In response to posthumous question 3, neutrinos heavier than half the mass of the Z will not be among its decay products, and so will not be included in the invisible decays, which excluded a 4th species by above. (Question 4 is logically inapposite, since it asks about applications of experimentally inferred facts to extraneous cosmological models. It properly belongs to another question on dark matter.)

