We measure and analyse the redshift distribution N(z) of magnitude-selected samples using spectroscopic redshift measurement from the magnitude-selected VIMOS VLT Deep Survey (VVDS) with 17<iAB<24.75. We compute the N(z) and provide reference parametric fits for i band, J, H and Ks band magnitud limited samples. The N(z) of a sample with iAB<24 has a mean redshift z=0.92, with 8.2% of the galaxies with z>2. Down to iAB<24.75 the sample has a mean redshift z=1.15 and 17.1% of the galaxies are beyond z=2. The projected sky density is 2.07+/-0.12 gal/arcmin2 at 1.4<z<2.5 and KsAB<22.5, 1.72+/-0.15 gal/arcmin2 at 2.7<z<3.4 and 0.59+/-0.09 gal/arcmin2 at 3.4<z<4.5 brighter than iAB=24.75. Galaxies at z~3 identified from magnitude-selected samples are 1.5 to 3 times more numerous than when they are colour-colour selected. We demonstrate that colour-colour selected samples over 1.4<z<4.5 are strongly contaminated by galaxies at other redshifts. Semi-analytic models on the Millennium simulations under-predict the number of luminous star-forming galaxies at z\sim1.8-2, as well as over-predict the number of low-luminosity galaxies at z<0.8. Our study provides comprehensive galaxy number counts N(z) from galaxies with spectroscopic redshifts over a large redshift domain 0<z<5, a solid basis for the measurement of volume-complete quantities. Magnitude-selected surveys identify a higher number of galaxies at z>2 than in colour-colour selected samples, and we use the magnitude-selected VVDS to emphasize the large uncertainties associated to other surveys using colour or colour-colour selected samples. Our results further demonstrate that semi-analytical models on dark matter simulations have yet to find the right balance of physical processes and time-scales to properly reproduce a fundamental galaxy population property like the observed N(z).