We show that the non-integer effective number of neutrinos $N^{mathrm{eff}}_ u$ can be understood as an effect of lepton $L$ asymmetry in the early Universe carried by the Dirac neutrino cosmic background. We show that $N_ u^{mathrm{eff}}=3.36pm0.34$ (CMB only) and $N_ u^{mathrm{eff}}= 3.62pm0.25$ (CMB and $H_0$) require a ratio between baryon number $B$ and lepton number to be $1.16 times 10^{-9}leqslant B/|L|leqslant 1.51 times 10^{-9}$. These values are close to the baryon-to-photon ratio $0.57times 10^{-9}leqslant B/N_gamma leqslant 0.67times10^{-9}$. Thus instead of the usual $|L|ll N_gamma$ and $Bsimeq |L|$, we propose to use $0.4 leqslant |L|/N_gammaleqslant 0.52$ and $Bll|L|$ as another natural choice, which resolves the tension between Planck-CMB and $H_0$ and leads to a non-integer value of $N_ u^{mathrm{eff}}>3$.