{'fraction_non_alphanumeric': 0.0426141148728314, 'fraction_numerical': 0.030332378866992308, 'mean_word_length': 4.339103717026379, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The VIMOS VLT Deep Survey: the redshift distribution N(z) of magnitude-limited samples down to iAB=24.75 and KsAB=22

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).

Spectroscopic redshift surveys form the basis from which the physical properties of the galaxy population and their evolution are derived, most notably the luminosity function (LF), the mass function (MF) and global quantities like the star formation rate density (SFRD), the stellar mass density, the merger rate, the clustering properties, as well as the metallicity and dust content. These observed properties make the needed benchmark against which to compare galaxy formation and evolution models combining major physical processes like the merger rate, gas accretion, AGN feedback, or environment effects, just to name a few.
Because of the variety of selection functions, different surveys do not sample the high redshift population in the same way, and comparing different surveys while relating their galaxy populations to the global picture of galaxy formation and evolution is not straightforward. While the goal is to produce measurements relevant for the global population across all types of galaxies, a complete census at all redshifts of all populations of galaxies from the highly star-forming to the oldest most passive galaxies is yet to be produced, and we are faced with several factors contributing to limiting the accuracy of our current census of the high redshift population.
First and foremost, the representativeness of a sample is difficult to assess because we do not a priori know the population we are sampling. Observing strategies aim to sample as completely as possible the entire galaxy population, but a range of different strategies have produced what is commonly referred to as a zoo of galaxy populations. High redshift surveys have produced magnitude limited samples, colour-colour selected samples (BzK, LBG), Lyman-α emitter samples (LAE, Ouchi et al. 2008), distant red galaxies (DRGs, van Dokkum et al., 2006), faint red galaxies (Franx et al., 2003), as well as sub-mm galaxies (SMGs, Blain et al. 2002), IR selected LIRG/ULIRG (e.g. Oliver et al. 2010) and others. Relating and assembling these overlapping populations to build a complete census of the galaxy population at z > 1 remains a serious challenge.
Another major difficulty is the estimate of the incompleteness of each selection technique. Incompleteness can either be built-in, with a specific selection purposely selecting only a part of the global population, or be the result of the observations and data processing techniques, or a combination of both. To estimate this incompleteness, surveys aim to securely identify the redshift of all galaxies in their samples, with a good knowledge of the selection function, and may rely on simulations to com-pute the fraction of objects that are a priori excluded by observational strategies.
Increasingly deeper multi-band photometry is used to compute accurate photometric redshifts (see e.g. Wolf et al. 2003, Ilbert et al. 2006, Coupon et al. 2009, Ilbert et al. 2010, Hidebrandt et al. 2012, Ilbert et al. 2013, and has become essential to identify galaxies up to the highest redshifts, (e.g. Bouwens et al. 2010, McLure et al. 2010, Ellis et al. 2013. Photometry, by construction, goes deeper than spectroscopy on continuumselected populations like the popular Lyman-break or Lymanα drop-out technique. However, spectroscopic follow-up often illustrates the difficulty to measure accurate redshifts of distant galaxies based on photometry alone, with degeneracies in redshift estimates (e.g. Capak et al. 2011, Boone et al. 2011, Pirzkal et al. 2013, and the large uncertainties associated to deriving global population properties from photometric samples. Moreover, the accuracy of photometric redshifts critically depends on the photometric bands used, their number and wavelength coverage, and, importantly, on the spectroscopic sample used to train them. Spectroscopic redshift measurements remain a necessary reference, especially at the higher redshift end which can be significantly affected by catastrophic errors in photometric redshift measurements produced by photometric errors. Another limitation to current data-sets is the relatively small field sizes which have been observed at z > 1, making measurements sensitive to large cosmic variance (e.g. Somerville, 2004). It is therefore necessary to proceed, albeit with more difficulties, to assemble comprehensive samples of galaxies with reliable spectroscopic redshifts.
The knowledge of the redshift distribution N(z) is the basic information upon which all of our current understanding of galaxy evolution is based upon, as to understand galaxy evolution we must be able to identify and count galaxies accurately, and it is only with a proper accounting that we can envisage to perform detailed analysis of the galaxy population and its evolution. While the N(z) is a simple statistical description of the galaxy population, it encodes all the physical processes acting to shape galaxies along cosmic time. Some of the most important diagnostics of galaxy formation and evolution are derived from galaxy counts: the SFRD evolution which can be derived from the LF and luminosity density (LD), and the stellar mass density evolution derived from the mass function. While these global properties contain a lot of information, their derivation involves a number of uncertainties e.g. in computing rest-frame luminosities, stellar masses, or effective volumes (Ilbert et al. 2004). As redshift is increasing, uncertainties in computing LFs and MFs, and derivatives like LDs and SFRDs, are increasing significantly. While a lot of progress has been made in constraining the SFRD, measurements at redshifts higher than z ≃ 1 − 1.5 still show a significant spread. The SFRD derived from the UV rest frame is relatively well constrained from z ∼ 1 − 1.5 to the present (e.g. Schiminovich et al., 2005;Tresse et al., 2007;Cucciati et al., 2012a). However, at z ∼ 1.5 − 2 measurements of the star formation rate show a factor 2-3 spread (Cucciati et al. 2012a, Behroozi et al. 2013, in large part because finding galaxies in the 'redshift desert' is difficult. Beyond z ≃ 2 different measurements of the UV-derived SFRD are spread within factors ∼ 3−10 (e.g. Bouwens et al. 2007, Tresse et al. 2007, Reddy et al. 2008, Cucciati et al. 2012a, Behroozi et al. 2013, illustrating the incomplete knowledge of the galaxy population at these epochs, as well as the proper accounting of all factors contributing to uncertainties (Poisson noise, completeness correction, fitting errors, cosmic variance, etc.). Several factors contribute to limiting the accuracy of LF/LD/SFRD measurements, most importantly the knowledge of the faint end slope of the LF, the weak constraints on the bright end of the LF because of the small volumes sampled, or dust correction uncertainties, that are likely to combine to produce the discrepancy between the SFH derived from the LD and the SFH computed from the evolution of the stellar mass density (e.g. Wilkins et al. 2008, Behroozi et al. 2013. The N(z), on the other hand, is a more straightforward observable to establish, involving less uncertain steps, and, even if more complex to analyse, it must be reproduced by any realistic model. Projected number densities are straightforward to compare from one sample to another as they are based only on counts corrected for observational incompleteness. One of the main source of uncertainty in producing number counts is the accuracy and reliability of the redshift measurements. Counts produced from photometric imaging surveys enable large samples of galaxies with photometric redshifts to be assembled, reaching fainter magnitudes than spectroscopic samples, although the photometric redshift accuracy is ∼ 10 4 km/s at best. With an accuracy of 0.05 × (1 + z) down to i AB ∼ 25 as is state of the art for multi-band photometric redshifts (see e.g. Ilbert et al. 2013), an error of dz = 0.2 − 0.3 at z ∼ 3 translates to an error in absolute magnitude of 0.1-0.15, which may significantly affect the accuracy of LFs computation. This is further complicated by catastrophic failures (e.g. those galaxies with |z spec −z phot | >> 0.05×(1+z)). Spectroscopic redshift surveys are necessary to provide accurate redshifts, even if they are targeting a subset of the galaxies detected in photometry and require to be corrected for incompleteness.
The knowledge of the N(z) is also an important element in studies of the cosmological parameters of the world model, like those using weak lensing as a cosmology probe for which an accurate knowledge of the redshift distribution of the background lensed population is necessary to maintain a high accuracy and minimize biases in deriving cosmological parameters with this technique (e.g. Fu et al., 2008) In this paper we use the final data release of the VIMOS VLT Deep Survey (VVDS) as presented in Le Fèvre et al. (2013) to compute the redshift distribution N(z) of magnitude limited samples. The VVDS final sample in the 0.61 deg 2 0224-04 field is a purely i−band limited spectroscopic redshift survey, with a total of 10 765 galaxies with spectroscopic redshifts, going down to i AB = 24.75, and covering a redshift range 0 < z < 5.
We summarize the properties of the VVDS sample in Section 2. The redshift distributions and a parametric description of the N(z) of i−band limited surveys at different depths, as well as for J−band, H−band and K s−band limited surveys, are presented in Section 3, and they are compared to results from semi-analytic simulations. We present a complete census of UVselected galaxies in increasing redshift ranges in Section 4 and compare them to galaxies selected using colour-colour criteria. We discuss these results in Section 5, and provide a summary in Section 6.  (Bielby et al. 2012).

VVDS selection function
The VVDS selection function is resulting from the target selection, the spatial and spectral sampling, and the completeness in redshift measurement. It is a key element in all science analysis, and has therefore been extensively studied. We refer the reader to the discussion in Le Fèvre et al. (2013) for a complete description, and we provide here an overview of the main components of this selection function which are needed to transform the observed galaxy counts N(z) into projected number densities discussed in following sections. Of particular importance is the knowledge of the survey incompleteness, to be able to produce completeness-corrected counts. We have performed an extensive characterization of the survey selection function, and of the redshift reliability flags, as described below. The VVDS selection proceeds from a simple apparent i−band magnitude selection, using the photometric catalogues produced by the CFH12K and CFHTLS imaging surveys. With a density of galaxies in the parent photometric catalogue ranging from ∼ 70 000 to ∼ 85 000 gal/deg 2 at the magnitude limits of the Deep and Ultra-Deep surveys resp., a 100% sampling of the galaxy population is impractical given current instrumentation, even with the high multiplex of VIMOS . The VVDS has therefore observed a random selection of galaxies, corresponding to about 25% and 6.5% of the full photometric parent population in the Deep and UltraDeep surveys, respectively, and we call this fraction the Target Sampling Rate (TSR). After the spectroscopic observations with VIMOS of this sub-sample and the data processing and redshift measurements, only a fraction of the spectroscopic targets provide a reliable redshift, and we call this the Spectroscopic Success Rate (SSR). The SSR is a function of both magnitude and redshift, and this can be estimated using the redshift reliability flag scheme combined to photometric redshift estimates from the extensive multi-band photometry, as originally presented in Ilbert et al. (2005), and derived in Cucciati et al. (2012a) with a detailed presentation for the final VVDS data release in Le Fèvre et al. (2013).
The redshift flag scheme used by the VVDS has evolved from the CFRS . It relies on the comparison of redshifts independently measured by at least two persons in the team, and reconciled to produce a final redshift measurement. The flags indicate the probability for a redshift measurement to be right, and are therefore a reliability indicator rather than a quality. Using the probabilistic nature of the redshift flags, it is then possible to use galaxies with different flags, making a statistical correction using the reliability of each flag, to infer global volume-representative quantities. The VVDS flags 1 to 4 have associated reliability 51%, 87%, 98% and 100%, respectively (Le Fèvre et al. 2013), with flag 0 for objects for which no 4 Le Fèvre, O.: VVDS: N(z) of magnitude limited samples to z ∼ 4.5 redshift measurement could be found, flag 9 for single emission line objects with ∼ 80% reliability, and flag 1.5 introduced for the Ultra-Deep survey and corresponding to objects with a good match between the z spec and z phot within the photometric redshifts errors (see Le Fèvre et al. 2013 for more details). The reliability estimates for each flag are very robust, as these have been derived from a number of independent observations of the same objects, a result from the well known cancellation of individual biases of observers when several independent measurements of the same variable are performed. A total of 1 263 galaxies have been observed independently twice within the VVDS (Le Fèvre et al. 2005a), as well as from the MASSIV (Contini et al. 2012) and VIPERS (Guzzo et al. 2013) surveys, and data independently processed. This gives a robust statistical baseline to estimate the redshift reliability of the VVDS redshift flags, as described in Le Fèvre et al. (2013).
As part of the latest ultra-deep observations, 241 VVDS-Deep galaxies which ended-up with redshift flag 0, or flags 1 and 2 and redshifts z > 1.4, have been re-observed with an exposure time of 16h, ∼ 3.5× longer than for the original VVDS-Deep observations, and with a larger wavelength domain 3600 < λ < 9300Å compared to 5500 < λ < 9300Å for the VVDS-Deep. This enables to reduce the redshift degeneracies produced when only a few spectral features are present in a smaller wavelength domain. The much deeper exposure time and broader wavelength coverage have led to a high success rate in measuring the redshift of these re-observed galaxies, and hence help assess the redshift distribution of the galaxies with lower redshift reliability flags 1 or 2, or failed redshift measurements (flags 0) of the VVDS-Deep sample. Indeed the success rate (flag 2, 3, 4, 9) of re-observed flag 0 is 85%, for flag 1 it is 86%, and for flag 2 88%. Using this re-observed sample, we have computed the photometric sampling rate, the target sampling rate, and the spectroscopic success rate (SSR), by redshift range and by flag category, leading to a robust understanding of the incompleteness of the sample, and of the redshift distribution of the failed population. In addition, we have used the extensive u * , g ′ , r ′ , i ′ , z ′ , B, V, R, I, J, H, and K s photometry in the VVDS-02 field (Le Fèvre et al. 2004, McCracken et al. 2003, CFHTLS-D1, Bielby et al., 2012 iterating from Ilbert et al. (2006) to compute accurate photometric redshifts which have then been compared to the observed spectroscopic redshifts. The results of this analysis are presented in Le Fèvre et al. (2013), which shows an excellent agreement between z spec and z phot , with dz = 0.04 × (1 + z) and a catastrophic failure rate of a few percent.
The complete understanding of the sample selection function summarized in this section, and detailed in Le Fèvre et al. (2013), is used in the following sections to study complete magnitude limited samples. The galaxy samples used in this paper are free from star or broad-line AGN contamination, as the VVDS spectroscopy easily enables to identify these objects, in a more straightforward way than from photometric samples.

Method
The average N(z) provides a simple but important description of the galaxy population and its evolution, combining the luminosity distribution of all types of galaxies at a fixed redshift. In this section we derive the observed N(z) for i−band as well as J, H, and K s−band selected samples to the unprecedented depth i AB = 24.75, J AB = 23, H AB = 22.5, K s AB = 22, and present a parametrisation to describe these distributions analytically.
We have corrected our sample for the selection function counting each galaxy with the following weight W gal,i : The Target Sampling Rate T S R and Spectroscopic Success Rate S S R are as defined in Section 2.2. The PS R is the Photometric Sampling Rate, i.e. the ratio of objects in the photometric catalogue used to select spectroscopic targets, over those in the parent photometric sample, in a given magnitude bin; this applies only to the Ultra-Deep survey as some galaxies with 23 ≤ i AB ≤ 24.75 have already been observed in the Deep survey, and PSR=1 for the Deep survey. The weight w 129 is the ratio of the number of galaxies with the lower reliability flags 1, 2 and single emission line flag 9 over the number of galaxies with redshifts in the same redshift bin, using a combination of photometric redshifts and spectroscopic redshifts from the Ultra-Deep sample. The behaviour of these weights is extensively described in Le Fèvre et al. (2013), and have been further described and used in Cucciati et al. (2012a). We note that w 129 may be overestimated at z > 2.5 because of a higher catastrophic failure rate of the photometric redshifts used to compute this weight, resulting in an artificial lowering of the counts once this correction has been applied; the effect of this uncertainty is further discussed in Section 3.3.
Applying the global weight W gal,i on each galaxy then provides corrected number counts, as described below.

Cosmic variance
We use the prescription detailed in Moster et al. (2011) to derive cosmic variance estimates for each of our samples. The main contribution of cosmic variance on galaxy numbers uncertainties is the volume probed, which depends on the area of the survey and the redshift range spanned. Because of the galaxy to dark matter bias, Moster et al. (2011) emphasize that cosmic variance also depends on the stellar mass range of galaxies observed, and we have used stellar mass estimates based on the code Le Phare as described in Ilbert et al. (2010Ilbert et al. ( , 2013. For each sample we then followed Moster's et al. (2011) cookbook, using a field size of 0.61 deg 2 , a mean redshiftz and redshift bin size ∆z as well as a mass range adapted to each sample. Given the magnitude selection of the VVDS samples, the mass range is increasingly probing higher masses at higher redshifts, and hence the cosmic variance is globally increasing with redshift and ranges from about 6% in the best cases to ∼ 20 − 30% at the highest redshifts, in ∆z = 0.5. The cosmic variance estimates are provided as a function of redshift for the redshift distribution N(z) presented in this section 3. For the projected number counts described in Section 4, the cosmic variance has been computed in the corresponding redshift bins, and added in quadrature to the number counts Poisson errors, to produce total count uncertainties.

17.5 ≤ i AB ≤ 24
The redshift distribution in this magnitude range has been pre- . The total sample of galaxies with spectroscopic redshifts and with a flag larger or equal to 1 and 17.5 ≤ i AB ≤ 24 is 10 044.
The original VVDS-Deep was ≃ 80% complete in redshift measurements (those galaxies with redshift reliability flags 2, 3, 4 and 9), and the re-observed sample taken from the 20% incompleteness now has reliable redshifts for ≃ 85% of this originally failed (flag 0) or low reliability (flag 1) sample. Although only a fraction, and not all, of this low reliability sample have been re-observed, this nevertheless allows to statistically correct the sample to a spectroscopic completeness of the i AB ≤ 24 sample equivalent to having 97% of the sample with a reliable redshift. This produces a spectroscopic redshift distribution free of bias, as the remaining 3% of the sample is not expected to modify the shape of the N(z).
The corrected and uncorrected redshift distributions for this sample using the selection function obtained in Section 2.2 are shown in Figure 1. We see very well the effect of the selection function correction, which fills-in the 'redshift desert' at 1.5 < z < 2.7 as produced by the LRRED grism observations, where most of the failed redshift measurements in the original VVDS-Deep originated from, as had been anticipated (Le Fèvre et al. 2005a, Ilbert et al. 2005, Tresse et al. 2007. As a consequence, the corrected N(z) has a mean redshift of z = 0.92 with a broad distribution with σ = 0.67. Because of the selection function correction, the mean redshift is significantly different from the valuez = 0.78 without correction that was quoted in Le Fèvre et al. (2005a).
One can note that the corrected N(z) at z > 2.5 is significantly lower than the observed N(z). This is the result of applying the weight w 129 , which has a value larger than 1 at these redshifts. While this translates that a number of low reliability flag 1 must be at lower redshifts than indicated by their measurements, it also includes increasing uncertainties and catastrophic failures of photometric redshifts which lead to increase w 129 , and hence decrease the N(z) once this weight is applied. The corrected N(z) at z > 2.5 for this magnitude range is therefore likely to be an under-estimate. This notwithstanding, the fraction of galaxies with z ≥ 2 at this depth is 8.2%.
The VVDS N(z) from spectroscopic redshifts is compared in Figure 1 to the N(z) derived from photometric redshifts in the COSMOS field, i.e. in a field completely independent from the VVDS-02h Deep field. We use a new version v2.0 of the i−band selected photo-z catalogue from Ilbert et al. (2009) which incorporates the new UltraVISTA data (McCracken et al. 2012, Ilbert et al. 2013, calibrated on spectroscopic redshift samples independent from the VVDS redshifts. The agreement is quite impressive up to z ≃ 2, while the high redshift tail at z > 2 is less populated in the photometric N(z).
We have made an attempt to fit the observed N(z) with analytic functions proposed in the literature (e.g. Wilson et al., 2001;van Waerbeke, 2001;Schrabback et al., 2010). However, as these studies did not deal with redshifts z > 1.5, we found that these functions are not capable to reproduce the high redshift tail observed at z > 1.5. We therefore slightly modified the form proposed by Schrabback et al. (2010) to which better takes into account the high redshift tail by the addition of a second exponential term. The result of the best fit using this formula is shown by the continuous line in Figure 1, and the best fit parameters are listed in Table 1.
The Ultra-Deep sample observations cover a large observed wavelength range 3600 < λ < 9300Å. There are always spectral features available for redshift measurement from z = 0 to z ∼ 6,

Fig. 1.
Spectroscopic redshift distribution N(z) (number of galaxies per square degree) of galaxies with 17.5 ≤ i AB ≤ 24, from the VVDS-Deep sample before (blue histogram), and after correction for the selection function (filled histogram). The continuous black line is the best fit using equation 2. The N(z) from the De Lucia and Blaizot (2007) SAM based on the Millennium simulation using the WMAP1 cosmology is shown as the dotted red line, the SAM based on the Millennium-WMAP3 as the dot-dash red line , and the latest Millenium-WMAP1 SAM as the dashed magenta line (Henriques et al., 2012). The open green histogram is the N(z) derived from the updated v2.0 photometric redshift sample from Ilbert et al. (2009), including UltraVista data, on 1.73 deg 2 in the COSMOS field. Estimates of cosmic variance are listed on the top of the plot. and therefore the Ultra-Deep sample does not present a 'redshift desert'. This enables to derive a redshift distribution N(z) with a high success rate at these magnitudes, the only i−band selected spectroscopic sample at this depth so far. Using the total sample of 622 galaxies with 23.0 ≤ i AB ≤ 24.75 and with flags ≥ 1.5 (see Le Fèvre et al. 2013), we find that the mean redshift is z = 1.38 with a broad distribution with σ = 0.81, indicating that the sample is probing the luminosity function sufficiently fainter than the mean luminosity L * when going to redshifts higher than z ∼ 1.5, producing the observed increase of galaxies numbers in the high redshift tail. In this magnitude range 23.5% of galaxies are at z ≥ 2. The result of the best fit using Equation-2 is shown in Figure 2, and the best fit parameters are listed in Table 1.
We compare the VVDS N(z) from spectroscopic redshifts to the N(z) derived from photometric redshifts in the COSMOS field (Ilbert et al. 2009), as shown in Figure 2. At these faint magnitudes the agreement remains excellent although with 20-25% more galaxies below z ≃ 1.5, and ∼ 25% less galaxies in the high redshift tail at z > 2, in the photometric redshift distribution compared to the VVDS.
The Deep and Ultra-Deep samples overlap in magnitude range over 23 ≤ i AB ≤ 24, with different galaxy samples observed with different instrument set-ups, and therefore provide two independent samples that can be compared to evaluate the robustness of the procedures applied to measure the redshift distributions. The N(z) for these two samples are shown in Figure  3. These two distributions agree very well, considering that the Combining the VVDS-Deep and the VVDS-UltraDeep samples we are able to compute for the first time the N(z spec ) from a magnitude-limited spectroscopic sample with 17.5 ≤ i AB ≤ 24.75. We have used the weighting scheme described above applying the TSR, SSR, PSR, and w 129 weights computed for the VVDS-UltraDeep survey to each galaxy. The result is shown in Figure 4. The mean redshift isz = 1.15, with a significant high redshift tail going up to z ≃ 5. The fraction of galaxies with z ≥ 2 is 17.1% The result of the best fit is also shown in Figure 4, with the best fit parameters listed in Table 1. The photometric redshift distribution derived from photometric redshifts in the COSMOS field (Ilbert et al. 2009) is shown in Figure 4. As noticed in previous sections, the agreement is excellent up to z ∼ 2, while above this redshift the N(z phot ) counts are lower by 25-30%.

J, H, and Ks selected samples
From our sample we are also able to derive magnitude limited samples in each of the J, H and K s bands. In these bands the VVDS spectroscopic samples allow to identify samples nearly 100% complete in redshift success rate down to J AB = 23, H AB = 22.5 and K s AB = 22 (Le Fèvre et al. 2013). There are 2023, 1679, 1457 galaxies, and the mean redshifts are 0.94, 0.92, and 0.88 for the J, H, and K s− limited samples at these depths, respectively. We present the redshift distribution down to K s AB = 22 in Figure 5. Best fit values using equation 2 are given in Table 1. Fig. 4. Spectroscopic redshift distribution N(z) (number of galaxies per square degree) of galaxies with 17.5 ≤ i AB ≤ 24.75, using the VVDS-Deep (10 044 galaxies) and VVDS-UltraDeep samples (721 galaxies), in 0.61 deg 2 , corrected for the selection function obtained in Section 2.2. The continuous black line is the best fit using equation 2, with best fit values given in Table 1

Comparison with the Millennium SAM simulations
The observed N(z), as a function of the magnitude limit of a sample, offers the possibility to test semi-analytic models (SAM). We have used SAM implemented on the Millennium Simulation (Springel et al. 2005, using the Millenium database: Lemson & the VIRGO consortium 2006) from de Lucia and Blaizot (2007) and the Munich SAM (Guo et al., 2011). While the Millennium simulation is based on WMAP1 cosmology (Spergel et al., 2003), it can be scaled to other cosmologies using the technique of Angulo & White (2010). We have used the WMAP1 and WMAP3 cosmology versions of the Munich SAM produced by Wang et al. (2008). In addition, we have used the latest implementation of the Munich SAM with WMAP1 cosmology as described by Guo et al. (2013). As detailed in Guo et al. (2013), the WMAP1 and WMAP3 versions of the SAM are expected to represent the extremes of the galaxy population as the SAM based on WMAP7 (Komatsu et al., 2011) seem to converge in between these two extremes (Guo et al., 2013), so we expect that the WMAP7 version of the SAM will fall in between the WMAP1 and WMAP3 that we describe below. The effects on the models of going to the slightly different cosmology from the Planck results (Planck collaboration 2013) remains to be calculated. We have compared the SAM results when using Bruzual and Charlot (2003, BC03) or the Maraston (2005, M05) galaxy stellar population synthesis model libraries. We find that the M05 N(z) in the simulations is always giving lower counts at z > 2 than BC03, hence further increasing the differences with the observed VVDS N(z), while counts for z < 2 are closely comparable. As our results and discussion are further reinforced when using M05 The N(z) derived from the Millennium SAM for i−band selected samples is shown in Figures 1, 2 and 4, expanding from the work of de la Torre et al. (2011). Two main discrepancies between current semi-analytic model predictions and observations are evident: the simulations predict too many faint galaxies at low redshifts, and, on the contrary, the simulations do not contain enough galaxies beyond z > 2. It can be seen from Figures 1, 2 and 4 that the discrepancy between the observed and model N(z) is increasing with magnitude. For the sample with 17.5 ≤ i AB ≤ 24 all models used are about ∼ 40% higher than the observed N(z), which is statistically significant at the 3σ level when taking into account the Poisson and cosmic variance on the data side, and the 1σ values on the simulated N(z) as derived from 24 realisations. Between redshifts 2.5 < z < 3.5, the situation is reversed: the observed N(z) is ∼ 2.5× larger than the highest simulated set, significant at the 4σ level. Models for the fainter sample with 23 ≤ i AB ≤ 24.75 present excess in counts by a factor ∼ 1.8 at 0.7 < z < 0.9, and counts lower by a factor ∼ 2 − 3 at z ∼ 2 − 3, the discrepancy being higher (lower) for WMAP1 than for WMAP3 cosmology at lower (higher) redshifts. When taking into account cosmic variance, these differences are also statistically significant at the 3 − 4σ level. A similar behaviour is observed for the K s band, with more galaxies predicted by the model at the lower redshifts than observed. It is also evident that the model N(z) for a K s AB ≤ 21.75 sample has lower counts than observed at z > 2, as shown in Figure 5. This is further discussed in Section 5.

A complete census of star-forming galaxies with
1.4 < z ≤ 4.5

Projected galaxy number counts in selected redshift domains
In this section we aim to obtain accurate counts of galaxies in increasing redshift ranges up to z = 4.5, as these are the basic input to the computation of statistical estimators like Luminosity Functions and Star Formation Rate Density, or mass functions and stellar mass density.
Here we take advantage of the VVDS spectroscopic redshifts sample, with low levels of incompleteness, to measure projected number counts. All the counts presented below are corrected as described in Section 2.2 and in Le Fèvre et al. (2013). All integrated count errors include Poisson noise as well as cosmic variance noise as described in Section 3.2. We are concentrating on high redshifts beyond z = 1.4 in order to match popular photometric selection techniques: the BzK-selection in 1.4 ≤ z ≤ 2.5, and the LBG-selection in 2.7 ≤ z ≤ 3.4 and 3.4 ≤ z ≤ 4.5. The redshift range 0 < z ≤ 1.4 is extensively discussed in Cucciati et al. (2012a).
All the VVDS counts are presented in Table 3.

Galaxies with 1.4 ≤ z ≤ 2.5
This redshift range is important as the peak of star formation seems to be occurring at this epoch. However, the secure identification of galaxies at these redshifts is complicated because of the lack of spectral features in the visible domain, making it difficult to measure spectroscopic redshifts (the so-called 'redshift desert'). The spectroscopic redshifts of 501 galaxies with flags 2, 3, 4 and 9 have been successfully measured in this range, with another 354 with flag 1. The projected number counts are presented in Figure 6. We find 2.07 ± 0.12 gal/arcmin 2 with 1.4 ≤ z ≤ 2.5 down to magnitude K s AB = 22.5, and 1.17 ± 0.08 gal/arcmin 2 with 22 ≤ K s AB ≤ 22.5 (the errors are including cosmic variance). We find a good agreement between the counts from the VVDS-Deep and Ultra-Deep samples in the magnitude range of overlap.
We find comparable number counts to the BzK selected sample of McCracken et al. (2009), as well as those of Kong et al. (2006), Blanc et al. (2008), and Daddi et al. (2004). However, our counts are about twice larger than those of Reddy et al. (2005) who find about 0.6 gal/arcmin 2 down to K s AB ≃ 22, and our counts are still 25 to 40% higher than theirs at the faint end 22 ≤ K s AB ≤ 23 even though our K s−band counts start to be incomplete fainter than K s AB = 22 as a result of the VVDS i−band selection.
As the BzK colour-colour selection is commonly used to select galaxies in this redshift range (e.g. Forster-Schreiber et al. 2009, Daddi et al. 2010, McCracken et al. 2010, Lin et al. 2012, it is important to build a robust understanding of the possible limitations of this technique. Using the VVDS i−band magnitude-selected spectroscopic sample, we can check the location of galaxies with known redshifts in a colour-colour plane, and verify which fraction of galaxies verifying the BzK selection are indeed in the redshift range 1.4 ≤ z ≤ 2.5. We use the (g-z) versus (z-Ks) distribution of galaxies with reliable redshifts in this redshift interval as shown in Figure 7. Although our filter set is slightly different, we empirically verify that the BzK criterion (Daddi et al., 2004) is suitable for gzK, maximizing the selection of galaxies within this redshift range, and minimizing the number of galaxies outside (see also Bielby et al., 2012). We have slightly adapted the criterion to take into account the gband vs. B band difference. For 'sgzK' active galaxies analogous to 'sBzK', they verify: and for 'pgzK' passive galaxies analogous to 'pBzK' they verify both: and (z − K s) AB ≥ 2.5 (5) Using the VVDS data set, and only the galaxies with the most reliable redshifts (flags 3, 4 and 9), hence independent of any weight correction, we find that the gzK criterion is quite efficient in picking-up galaxies with 1.4 ≤ z ≤ 2.5, as among galaxies with a spectroscopic redshift in this range, 83% (VVDS Deep) to 94% (VVDS Ultra-Deep) verify criterion (3) for K s AB ≤ 22. Going to fainter K magnitudes K s AB = 24 (above the completeness limit of the K s−band imaging, Bielby et al. 2012) our spectroscopic data becomes significantly incomplete, leaving only bluer galaxies in our sample (see Le Fèvre et al. 2013, fig.18), but relying again on the most reliable redshifts we find that still 78% (Deep) to 86% (Ultra-Deep) of galaxies verify criterion (3) down to this depth. This shows that there is no major break in the BzK/gzK selection ability down to this magnitude, but it appears that a significant fraction of the population of galaxies escape the selection, as also identified from simulations (Merson et al. 2013). We find that the contamination, computed as the fraction of galaxies in the selection area satisfying criterion (3) but at a redshift outside the expected redshift range, is quite significant at about 35% in the Deep survey. This contamination seems to be magnitude dependent as in the Ultra-Deep survey it is increasing from 23% to 34% for limiting magnitude from K s AB = 22 to K s AB = 24. This analysis mostly concerns the active sBzK galaxies, as, as expected, we find only a few galaxies verifying the pBzK criterion (4)+(5). However, adapting the pBzK criterion to (z − K s) AB − 1.1 × (g − z) AB < −0.2 and (z − K s) AB ≥ 2.25 would enable access to a small population of galaxies identified with the right spectroscopic redshift in this category, or about 7% of our sample.
We conclude that the BzK/gzK photometric criterion is working well in selecting a sample of star-forming galaxies with 1.4 ≤ z ≤ 2.5, as it selects ≃80% of galaxies in the correct redshift range. However, using BzK/gzK photometric selection alone, it would be necessary to take into account that a BzK/gzK photometric sample would be significantly contaminated, with ∼ 30% of the galaxies selected in the colour-colour selection area having a redshift outside the 1.4 ≤ z ≤ 2.5 range down to K s AB = 22, and a contamination rate possibly increasing at fainter magnitudes.

Galaxies with
The projected number density of galaxies at 2.7 ≤ z ≤ 3.4 has been computed using the full Deep and Ultra-Deep samples. Results are shown in Figure 8. At a magnitude i AB = 24.5 we find 0.94±0.10 galaxy per square arc-minute per half magnitude, and There are few spectroscopic surveys in this redshift range to compare to. In Figure 8 we compare our results with the LBG counts of Steidel et al. (1999), using the values given in their Table 3 corrected by the effective volume for a cosmology with Ω m = 0.3 and Ω Λ = 0.7, and transforming R AB into i AB using the average value of R AB = i AB + 0.09 derived from template fitting. The total projected number density from Steidel et al. (1999) in the range 22 ≤ i AB ≤ 24.75 is 0.6 gal/arcmin 2 , or less than half the counts obtained from our magnitude selected sample. The difference between our counts and the Steidel et al. (1999) counts is depending on the magnitude of the sample: at bright magnitudes i AB ≤ 23.25, our counts are 3-4 times larger, while at 23.5 ≤ i AB ≤ 24.75 the difference is reduced to a factor 1.5−2. Bielby et al. (2013) performed a spectroscopic survey based on LBG UBR photometric selection. Down to R Vega = 24.75, they find about 1 gal/arcmin 2 , about 40% lower than our counts, but we note that their spectroscopic success rate is about 1/3, making their counts more sensitive to uncertainties on the completeness correction. Interestingly, although they are also LBG colourselected Bielby et al. (2013) identify 1.5 − 2 times more galaxies at relatively bright R Vega ≤ 24.25 than Steidel et al. (2003), but comparable to our results. As the volumes probed by both the Steidel et al. (2003) and the VVDS are still relatively limited, a possible source of discrepancy, particularly at the bright end, might be cosmic variance. This will need to be further investigated from spectroscopic surveys in wider areas. Fig. 7. Efficiency of the gzK selection criterion to identify galaxies at 1.4 ≤ z ≤ 2.5 compared to i−band magnitude selection from the VVDS Deep sample (top) and from the Ultra-Deep sample (bottom): (left) galaxies with spectroscopic redshifts in 1.4 ≤ z ≤ 2.5 (flags 2: blue triangles, flags 3, 4, 9: red squares). Average colour errors are indicated on the bottom left of the top and bottom panels. Galaxies in the shaded area would be excluded from the gzK colour selection as being at redshifts outside 1.4 ≤ z ≤ 2.5, although their spectroscopic redshifts indicate otherwise. Using the most reliable flag 3,4, and 9 magnitude-selected spectroscopic redshift sample, we find that ∼ 10% of the total number of galaxies with a correct spectroscopic redshift would not be selected using gzK selection criterion (3). (right)galaxies with spectroscopic redshifts z < 1.4 (black open squares) or z > 2.5 (red filled squares), and stars (green starred symbols). Galaxies outside the shaded area would be wrongly selected by the gzK selection as being at 1.4 ≤ z ≤ 2.5, using only the most reliable flags 3, 4 and 9 in the VVDS-UltraDeep they represent 23% (resp. 34%) of the total number of galaxies with the correct spectroscopic redshift for magnitudes K s AB ≤ 22 (resp. 24). All galaxies with K s AB ≤ 24 are plotted, above the K s−band completeness magnitude limit (Bielby et al. 2012). Barger et al. (2008) claim to disagree with our earlier results (Le Fèvre et al. 2005b), mis-interpreting the numbers of galaxies reported in Le Fèvre et al. (2005b) and Paltani et al. (2007) as the result of a very conservative diagonal limit in the u − g, g − r colour-colour diagram selection. However they apparently did not take into account that our sample is magnitude-selected, not ugr LBG-selected, so their interpretation of what they believed was higher numbers than theirs in this redshift range is incorrect. Moreover, while they claim that they don't find a population of galaxies outside their ugr-LBG selection area, this supposed discrepancy with our results is not statistically significant. Their sample suffers from the small volume sampled corresponding to the 145 arcmin 2 field of view of the ACS GOODS-North field and from a significantly brighter completeness magnitude F850LP AB ∼ 23, more than 1.5 magnitude shallower than ours, which leads to poor number statistics from their sample. When scaling to a 145 arcmin 2 field of view, and a limiting magnitude F850LP AB = 23, we predict from our counts (Figure 8) that they should have detected ≃ 10 galaxies with 2.7 ≤ z ≤ 3.4, while they find 12, hence entirely compatible with our results.
The VVDS counts presented here therefore confirm the trend found by Le Fèvre et al. (2005b) that an i−band magnitude selected sample identifies a projected number of galaxies at z ∼ 3 larger than in a colour-colour LBG sample. The Lyman-break technique, or Lyman-α 'drop-out' at the highest redshifts, is at the core of most studies of high redshift galaxies beyond redshift 2.5, as the Lyman-break selection is extensively used to identify high redshift galaxy samples from the numerous foreground. It is therefore important to use independent estimates of the efficiency of this selection. To understand the differences between our magnitude-selected counts and LBG counts, we are able to use our i−band selected spectroscopic sample and identify how many galaxies with known spectroscopic redshifts in the redshift range corresponding to the LBG selection are indeed falling in or out of the LBG colour-colour selection area. This a posteriori analysis can then provide an indication of the effectiveness and limitations of the photometric LBG colour-colour selection technique.
As our sample is magnitude selected, it is straightforward to plot the VVDS galaxies with a spectroscopic redshift 2.7 ≤ z ≤ 3.4 on a u − g, g − r colour-colour diagram and measure the fractions of galaxies in or out of the LBG selection area. Very deep u, g, and r photometry is available from the CFHTLS survey, reaching magnitudes u AB = 27, g AB = 26.8, and r AB = 26.3 (∼ 5σ in 1.2 arc-sec aperture), significantly deeper than was available in our earlier comparisons (Le Fèvre et al. 2005b). We present the u −g, g −r distribution of galaxies in the VVDS Deep and Ultra-Deep samples in Figure 9. We find the following: -About 25% of galaxies with 17.5 ≤ i AB ≤ 24 and 17% with 23 ≤ i AB ≤ 24.75 and reliable spectroscopic redshifts in the redshift range 2.7 ≤ z ≤ 3.4 fall outside of the u − g, g − r selection area and thus would not be selected from a priori ugr selection. -For the faintest galaxies in the VVDS Ultra-Deep sample, 73% of the galaxies which satisfy the LBG selection criteria in the u − g, g − r diagram have a spectroscopic redshift outside the 2.7 ≤ z ≤ 3.4 domain, making the contamination very high, dominating the galaxies which are really at 2.7 ≤ z ≤ 3.4 by a factor of up to ∼ 3.7 (using only our very reliable spectroscopic redshift flags 3, 4 and 9). -92% of the broad-line AGN with 2.7 ≤ z AGN ≤ 3.4 are in the LBG selection area, but the contamination is high with about half the AGN with reliable spectroscopic redshift falling in the LBG selection area being in reality outside the 2.7 ≤ z ≤ 3.4 range. -The stellar locus is crossing the LBG selection area, hence a colour-colour selection using the u, g, r filter set will include a significant fraction of stars: down to I AB = 24, ∼ 30% of the objects satisfying the LBG criterion are stars (the VVDS-0224-04 field is at a relatively high Galactic latitude of 58deg, this fraction is likely to change at different latitudes).
Adjusting the selection boundaries, e.g. increasing the u-g colour cut to redder colours, would allow to exclude more objects with redshifts outside the 2.7 ≤ z ≤ 3.4 range, but this would be at the expense of objects with redshifts in this range.
To test the dependency of the colour selection of objects on the filter set, we have transformed our u, g, and r magnitudes into the U n , G, R filter set defined by Steidel & Hamilton (1993) in the following way. We have performed a template fitting of the complete ugrizJHK s data-set we have at hands, using the templates to derive the colour corrections to apply to each u, g, r magnitude in the Gunn system, to transform them to U n , G, R. The U n GR colour-colour diagram is shown in Figure 10. The fraction of galaxies with redshifts 2.7 ≤ z ≤ 3.4 as measured from the VVDS i−band magnitude-selected spectroscopic sample but outside of the LBG u-g,g-r selection box is ∼ 25% in the Deep sample and ∼ 17% in the Ultra-Deep sample, for all flags larger or equal to 3, comparable to what we obtain using the u, g, r filters. However, the U n GR filter set is much more efficient at minimizing the contamination from galaxies at redshifts outside 2.7 ≤ z ≤ 3.4. For galaxies which satisfy the U n GR LBG criteria, 72% would indeed be in the right redshift range, while 28% are galaxies at other redshifts. This filter set selects 66% of the broad-line AGN with 2.7 ≤ z AGN ≤ 3.4 in the U n GR selection area, less than the ugr set, but reduces the contamination of AGN in the LBG selection area which have a spectroscopic redshift outside 2.7 ≤ z ≤ 3.4 to ∼ 25%. The contamination by stars is also low at a few percent. The U n , G, R filter set is therefore better suited to pre-select galaxies in the 2.7 ≤ z ≤ 3.4 redshift range than the more widely used Gunn u, g, r set.
To understand the higher projected number counts in the VVDS magnitude-selected sample than the counts from LBG selection, we compare the N(z) from our survey to the N(z) of Steidel et al. (1999) in Figure 11, after completeness correction for the VVDS and volume correction for the LBG sample. It is clear that while the magnitude-limited sample shows, as expected, a steady decline of the N(z) with redshift, the N(z) of the LBG is bell-shaped, the result of a combination of effects. The fixed filters band-passes produce a redshift dependent sensitivity in identifying a drop in the continuum: at the middle of the bluer band the sensitivity to identify a continuum drop is maximum, while when the drop is towards the edges of the bandpass the averaged flux in that filter becomes increasingly dominated by either side of the break, lowering the break contrast. Combined with photometric errors, it results that only galaxies seen through increasingly higher IGM absorption are identified when the redshift places the break increasingly on the sides of the bandpass. Making a ratio of the two N(z) shows that this effect is largely responsible for the factor of ≃ 2 difference between the magnitudeselected projected counts and the LBG-based counts.
When counts are transformed into a luminosity function (or mass function, or any other count-based statistics), taking into account the selection function should in principle correct any survey for their respective incompleteness to provide 'the same' LF in the same redshift range. The techniques used to transform counts into a LF from colour-colour selection are significantly more involved than assessing the completeness of a spectroscopic sample, as extensive photometric simulations need to be performed (e.g. Sawicki & Thompson 2005, Reddy et al. 2008, which include significant uncertainties in terms of the source density (which may lead to different photometric contamination from neighbours), the morphological properties (in particular the surface brightness) of the sources, or their spectral energy distribution including stars, AGN, a variable amount of internal dust or IGM extinction. A detailed computation of the luminosity function, luminosity density and star formation rate using the counts from the VVDS Deep and Ultra-deep sample is presented in Cucciati et al. (2012a), including a comparison of our LF with the LBG LF from Steidel et al. (1999). Based on this conservative analysis, we find that the VVDS LF has a slightly lower volume density than reported in our earlier findings (Paltani et al., 2007, Tresse et al., 2007, a consequence of adding the Ultra-Deep survey to the Deep, and using the deeper u-band photometry that became available from the CFHTLS. However, significant differences between the VVDS-LF and LBG-LF are still observed, with the magnitude-selected LF from the VVDS being more than 50% higher the the LBG LF at the bright end (Cucciati et al. 2012a, Appendix C).
The comparison of a purely magnitude selected sample with colour-colour selected samples as presented here shows that the selection of high redshift galaxies from colour-colour techniques, while powerful to find these galaxies in significant numbers, is subject to limitations and uncertainties which need to be properly estimated and corrected for, that it is sensitive to the Fig. 8. Projected galaxy number counts per square arc-minute as a function of i AB magnitude for galaxies with spectroscopic redshifts 2.7 ≤ z spec ≤ 3.4, selected solely from their i AB magnitudes, from the VVDS-Deep (filled squares), the VVDS-UltraDeep (triangles), compared to data for galaxies selected from the Lyman-break technique (from Steidel et al., 1999;empty squares) exact filter set used, and that these errors must be accounted for properly as they propagate when computing volume complete quantities like the global star formation rate density.
4.4. Galaxies with 3.4 ≤ z ≤ 4.5 At the highest redshift end of the VVDS, we have identified a total of 90 galaxies with reliable redshifts 3.4 ≤ z ≤ 4.5 including 73 with flags 2, and 17 with flags [3,4,9], and another 110 galaxies with 50% reliable flag 1. We find 0.12 ± 0.04 gal/arcmin 2 in this redshift range and brighter than i AB = 24, and an additional 0.43 ± 0.06 gal/arcmin 2 with 24 ≤ i AB ≤ 24.75 (errors are including cosmic variance). Down to i 775,AB = 24 and i 775,AB = 24.75, Bouwens et al. (2007) find 0.025 ± 0.01 and 0.47±0.04 gal/arcmin 2 , respectively, in good agreement with our counts, although the observed colour distribution of our galaxies in (g − r, r − i) shows a significant number of galaxies outside the LBG colour-colour selection area, as described below. Steidel et al. (1999) report projected counts of about 0.02 and 0.25 gal/arcmin 2 down to I AB = 24 and I AB = 24.75, respectively, in a redshift interval 3.8 ≤ z ≤ 4.5, and after correction for their incompleteness, about twice lower than our counts.
The VVDS spectroscopic sample also enables to make an a posteriori check of the efficiency of the LBG selection in the g−r, r−i colour-colour plane. Based on the distribution of galaxies with redshifts outside 3.4 ≤ z ≤ 4.5 and with very reliable redshifts (flags 3, 4, 9), we have adjusted the LBG colour criterion in the gri filter set to (g − r) ≥ 0.8, (r − i) ≤ 0.8 and (g − r) − (r − i) ≥ 0.7 (Figure 12). We find that in this redshift range and with the g, r, and i−band photometry, it is hard to null the contamination by galaxies outside of the targeted redshift range without loosing too many of the galaxies in the correct redshift range 3.4 ≤ z ≤ 4.5. With the above colour criteria, we find from the Ultra-Deep sample that there are about as many Fig. 9. u-g vs. g-r colour-colour diagram for galaxies with spectroscopic redshifts 2.7 ≤ z ≤ 3.4 magnitude selected in the iband, combining the VVDS-Deep and the VVDS-UltraDeep. Galaxies with 2.7 ≤ z ≤ 3.4 are identified with triangles and squares for reliable flag 2 and very reliable flag 3, 4 and 9, respectively (see text). The average colour error at i AB = 24.75 is indicated on the lower-right corner. 46% of flag 2 and 17% of the flag 3, 4, 9 are found outside of the ugr selection area (dashed line) set from template tracks. Galaxies with spectroscopic redshifts z < 2.7 or z > 3.4, are shown as dots, they are 3.7 times more numerous than galaxies with spectroscopic redshifts 2.7 ≤ z ≤ 3.4 in the ugr selection area. Stars are represented with a starred symbol, and also overlap with the LBG selection box. Broad-line AGN with flag 13, 14 and 19 are identified as filled circles when 2.7 ≤ z AGN ≤ 3.4, and by empty circles out of this range. 92% of the AGN with 2.7 ≤ z AGN ≤ 3.4 are in the ugr selection area, but the contamination is high with about half the AGN in the ugr selection area having a spectroscopic redshift outside 2.7 ≤ z ≤ 3.4. With this u,g,r filter set, a large contaminating population is therefore expected when selecting samples of galaxies with 2.7 ≤ z ≤ 3.4 using a priori ugr colour selection. The VVDS magnitude selection is immune to this bias. galaxies with redshifts 3.4 ≤ z ≤ 4.5 than galaxies at other redshifts in the LBG box, while 73% of galaxies selected from the LBG criterion are outside this redshift range in the Deep sample. We can also estimate the fraction of galaxies which have the correct redshift 3.4 ≤ z ≤ 4.5, but which would not be selected in the LBG box: we find that about one third of the galaxies are outside of the LBG box, both in the Deep and Ultra-Deep samples. The situation seems even worse when looking for the reliable redshifts (flag 2), for which 60 to 90% are outside of the LBG box (Figure 12). Only a few broad-line AGN are identified in this redshift range in the Deep survey, 80% appear in the gri LBG selection box, and there does not seem to be any contamination in the gri selection box from AGN at redshifts outside 3.4 ≤ z ≤ 4.5.
We conclude from this analysis that using a priori colour selection in the g − r, r − i colour-colour plane for galaxies with 3.4 ≤ z ≤ 4.5 would loose about one third of the galaxies in this redshift range outside of the LBG box, and there would be Fig. 10. U n −G vs. G −R colour-colour diagram for galaxies with spectroscopic redshifts 2.7 ≤ z ≤ 3.4 magnitude selected in the i-band, combining the VVDS-Deep and the VVDS-UltraDeep. U n GR magnitudes of galaxies observed in the VVDS have been obtained by transforming ugr magnitudes using the best galaxy template fitting the full photometric data-set at the measured redshift (see text). Galaxies with 2.7 ≤ z ≤ 3.4 are identified with triangles and squares for confidence classes flag 2 and flag 3, 4 and 9, respectively (see text). The LBG selection of U n − G > (G − R) = 1 and G − R ≤ 1.2 is indicated by the dashed line. 29% of flag 2 (reliable redshifts) and 17% of the flag 3 and 4 (very reliable redshifts) are found outside of the U n GR selection area (dashed line) set from template tracks. Among galaxies that would be selected in the U n GR area as being at 2.7 ≤ z ≤ 3.4, our spectroscopic redshifts sample shows that 28% of galaxies are in fact at z < 2.7 or z > 3.4. Broad-line AGN with flag 13, 14 and 19 are identified as filled circles when 2.7 ≤ z AGN ≤ 3.4, and by empty circles out of this range. This filter set selects 66% of the AGN with 2.7 ≤ z AGN ≤ 3.4 in the U n GR selection area, less than the ugr set, but reduces the contamination of AGN in the U n GR selection area but at other redshifts to ∼ 25%. Stars are represented with a starred symbol, and have a much reduced overlap with the LBG selection box than in the ugr diagram. With a U n GR filter set, we conclude that a sample of galaxies selected using a priori U n GR colour selection, would contain 70% of galaxies with 2.7 ≤ z ≤ 3.4, and with 30% of galaxies and stars forming a contaminating population. a contamination from galaxies at other redshifts ranging from 100% to 2.8 times larger. It is then possible that colour-colour selected samples identify the approximate same projected number densities as magnitude selected samples due to a lucky balance of loosing approximately the same number of galaxies out of the colour-colour selection than is gained from galaxies verifying the selection but being at the wrong redshifts. Our findings again indicate that the purity of a colour-colour selection is strongly dependent on the filter set used, and must rely heavily on estimates of the completeness from photometric simulations and associated uncertainties. Fig. 11. Redshift distribution for galaxies in the range 2.7 ≤ z ≤ 3.4, selected solely from their i AB magnitudes from the VVDS-Deep and Ultra-Deep (grey shaded histogram), compared to the N(z) for galaxies selected from the Lyman-break technique (from Steidel et al., 1999;hatched histogram). The best fit to the VVDS data is represented by the black line. The vertical dashed lines represent the limits used to produce and compare counts based on the LBG sample. The counts in 2.7 ≤ z ≤ 3.4 from the magnitude-selected VVDS are about twice the counts from the LBG sample, emphasizing the impact of the colourcolour selection function in selecting galaxies from the underlying magnitude-limited population.

Discussion
From the final VIMOS VLT Deep Survey data release of 10 765 galaxies with spectroscopic redshifts in 0.61 deg 2 on the 0226-04 field (Le Fèvre et al. 2013), we have computed the redshift distribution N(z) of magnitude-selected samples at different i−band depths, as well as for J, H and K s−limited samples. We find that for a sample of galaxies with a spectroscopic redshift measurement and selected down to i AB = 24, the redshift distribution peaks at a meanz = 0.92, and 8.2% of the galaxies are at z ≥ 2. Going down to i AB = 24.75, the mean redshift of the distribution becomesz = 1.15 and the high redshift tail becomes more prominent with 17.1% of the galaxies at z ≥ 2. Analytic functions have been fit to the i, J, H, and K s− selected samples, providing reference N(z) for future studies.
Using the N(z) we have produced a complete census of galaxies up to z ≃ 4.5 from projected number counts. The sum of the VVDS surveys provide a unique opportunity to infer accurate galaxy number counts as the survey results from a simple magnitude selection, successfully crossing any instrumentinduced redshift desert. Using the high equivalent completeness of the VVDS sample, we have derived the projected number density of galaxies in different redshift ranges: we find 2.07 ± 0.12 gal/arcmin 2 at 1.4 < z < 2.5 with K s AB ≤ 22.5, 1.72 ± 0.15 gal/arcmin 2 in 2.7 < z < 3.4 with i AB ≤ 24.75, and 0.59 ± 0.09 gal/arcmin 2 in 3.4 < z < 4.5 with i AB ≤ 24.75. Using our magnitude selected spectroscopic sample, we have been able to test the effectiveness and limitations that an a priori photometric colourcolour selection would lead to. We find that colour-colour se- Fig. 12. g-r vs. r-i colour-colour diagram for galaxies with spectroscopic redshifts 3.4 < z ≤ 4.5 magnitude selected in the i-band, for the VVDS-Deep (right) and the VVDS-UltraDeep (left). Galaxies with 3.4 < z ≤ 4.5 are identified with triangles and squares for confidence classes flag 2 and flag 3, 4 and 9, respectively (see text). The typical colour errors at i AB = 24.75 are identified on the lower-right corner (left panel). The gri selection area (dashed line) has been set to minimize contamination and maximize the number of galaxies in this redshift range. Galaxies with spectroscopic redshifts z < 3.4 or z > 4.5, are shown as dots, they are ∼ 6.7 times more numerous than galaxies with spectroscopic redshifts 3.4 ≤ z ≤ 4.5 in the gri selection area. Broad-line AGN are represented by a circle, filled when the spectroscopic redshift is 3.4 ≤ z AGN ≤ 4.5, empty when outside this range. Stars are represented with a starred symbol, 80% of them are excluded from the chosen drop-out galaxy box. With this g,r,i filter set, a large contaminating population is therefore expected when selecting samples of galaxies with 3.4 < z ≤ 4.5 using a priori gri colour selection. lected samples like BzK or LBG are efficient at selecting galaxies in the target redshift ranges, but that 20-30% of galaxies are missed by the colour-colour selection, depending on the redshift range. Several effects could produce this scattering beyond the expected colour-colour locus, in particular the contribution from nebular lines which may significantly affect the observed colours (de Barros et al. 2012). The photometric colour-colour selected samples are significantly affected by contamination from galaxies at other redshifts but scattered inside the colour-colour selection area, the contamination being strongly dependent on the exact shape of the photometric filters used, on the colour cuts applied, and on magnitude. This further emphasizes that the largest source of uncertainty in colour-selected samples is the simulation of photometric completeness (e.g. Sawicki & Thompson 2005, Reddy et al. 2008. While standard photometric simulations are built from a priori expectations on the projected number density and on the range of SED distribution of distant galaxies, these simulations may have difficulties to properly take into account the complex morphological properties of galaxies beyond z ∼ 1, and in particular objects with low surface brightness. This is further complicated by source confusion from projected nearby objects, either along the line of sight or physical merging pairs (which represent ∼ 20% of the z ≃ 3 population, Tasca et al. 2013), or because of the increasing number of atypical SEDs at z > 1 due to varying dust attenuation (Cucciati et al. 2012), a change in AGN activity, etc.. The comparison with our data shows that the photometric corrections factors applied to colour-colour selected samples may need to be improved to match the real numbers of galaxies, as they consistently produce lower galaxy counts over the redshift range 1.4 < z < 4.5. As un-certainties on these counts propagate to the computation of e.g. luminosity and mass functions, and therefore to the history of star formation and mass assembly which form the basis of our current understanding of galaxy evolution, more efforts should be placed on the completeness corrections applied to colourcolour selected samples. On the other hand, spectroscopic samples obtained from purely magnitude-selection also suffer from incompleteness depending on the wavelength range and depth, but reaching spectroscopic completeness close to 100% enables an unbiased view of the galaxy population. Purely magnitude selected samples allow an easier control of the selection function and are less dependant on any change in the SED distribution of the population to be observed.
Although the N(z) is a simple statistical description of the galaxy population, it is combining all evolutionary effects of the different galaxy populations selected by a survey, and it is therefore sensitive to all major physical processes at work in the build-up of galaxies along cosmic time. The N(z) predicted using dark matter simulations coupled to semi-analytic models (De Lucia & Blaizot, 2007;Wang et al., 2008;Guo et al., 2011, Guo et al., 2013 do not accurately represent our observed redshift distribution data. We find that simulations over-predict the number of low redshift z < 1 galaxies, by factors of ∼ 1.3 − 1.6 at 0.7 < z < 0.9, ∼ 1.2 − 1.3 at 0.5 < z < 0.7, for galaxies brighter than i AB = 24. The discrepancy between models and observations increases with magnitude at low redshifts z < 0.9, with 1.8 times more galaxies in the SAM at 0.7 < z < 0.9 for 23 ≤ i AB ≤ 24.75, indicating that the simulations overproduce low luminosity objects. This points out, as already noted from luminosity function analysis (e.g. Cucciati et al. 2012b), that the lowering of the number of galaxies from processes like merging or star-formation quenching and feedback is not sufficiently effective in these simulations. The simulations also significantly under-predict the number of star-forming galaxies at higher redshifts, the discrepancy becoming higher with increasing redshift, with ∼ 2 times more galaxies observed at 2 < z < 3, and ∼ 3 times more at 3 < z < 4 down to i AB = 24.75. This indicates that the formation processes in simulations are not sufficiently efficient to produce bright galaxies early enough in cosmic time. The K s−band N(z) comparison to the Henriques et al. (2012) simulation shows a similar behaviour, but somewhat exacerbated: the model produces more galaxies at all redshifts z < 2, with about 40% more galaxies in 0.8 < z < 1, and not enough galaxies at z > 2 with about 4 times less galaxies in the model than observed at 2 < z < 3. These findings on the N(z) for i−band and K s−band selected samples then indicate that the star formation activity in model galaxies is not strong enough to produce the bright galaxies observed in i−band counts, nor, if we take the K-band as a proxy for stellar mass, enough massive galaxies at z > 2. While these deficiencies in the models have been already pointed out, the N(z) provides a simple synthetic view of the main discrepancies between current simulations and observations, and understanding these discrepancies offers a clear opportunity to make progress in our understanding of galaxy evolution.

Summary
Using the final VVDS sample we have derived galaxy counts over 0 < z < 5. We find that: -The redshift distribution N(z) of galaxies magnitude-selected from i−band, or from J, H or K s− bands, can be assembled with a low incompleteness, successfully crossing any instrument-induced redshift desert. -The N(z) of samples with 17.5 ≤ I AB ≤ 24, 17.5 ≤ i AB ≤ 24.75, and 23 ≤ i AB ≤ 24.75, have mean redshiftsz = 0.92, 1.15, and 1.38, respectively. We observe a high redshift tail of bright galaxies up to z ∼ 5, galaxies with z ≥ 2 representing ≃17% of an i−band selected sample with i AB ≤ 24.75. -Parametric fit to the N(z) data are provided, offering reference analytical descriptions of the global galaxy population. These may be used e.g. for weak-lensing analysis requiring a knowledge of the redshift distribution of background galaxies behind gravitational lenses. -We use the N(z) to derive the projected number counts of galaxies in various redshift ranges. We find 2.07±0.12 galaxies per arcmin 2 at 1.4 ≤ z ≤ 2.5 and K s AB ≤ 22.5, 1.72±0.15 galaxies per arcmin 2 at 2.7 ≤ z ≤ 3.4 and 0.59 ± 0.09 galaxies per arcmin 2 at 3.4 ≤ z ≤ 4.5 brighter than i AB = 24.75 (errors include Poisson noise as well as cosmic variance). -Galaxies identified from magnitude-limited samples are 1.5 to 3 times more numerous in projected counts than galaxies identified from LBG samples at z ∼ 3, depending on magnitude. This is mostly because of the varying sensitivity of a filter set to a continuum break depending on the position of the break in the filter at the redshift of the source. -Combining the VVDS i−band selected samples with deep photometry, we have analysed the effect of colour-colour selection on galaxy number counts. We find that BzK/gzK for 1.4 ≤ z ≤ 2.5 or LBG selection using u − g, g − r for 2.7 ≤ z ≤ 3.4 and g − r, r − i for 3.4 ≤ z ≤ 4.5, work well in selecting galaxies in these redshift ranges. However we also identify that a significant fraction of up to ∼ 20 − 30% of galaxies in these redshift ranges are missed by the colourcolour selection, and, moreover, that the colour-colour selection also picks-up a large fraction of galaxies at other redshifts which may seriously contaminate colour-colour selected samples, depending on the exact shape of the filters used, and the depth of the sample. -Comparing the N(z) with semi-analytic models on the Millennium simulation, we find that the models overestimate the number of faint galaxies at low redshifts z < 1, and under-estimate the number of bright galaxies at high redshifts z > 2.
Our results further stress the importance of building-up robust counts of galaxies as an input to conducting more evolved analysis of the statistical and physical properties of galaxies. Accurately counting galaxies remains a serious challenge at redshifts z 1, and associated uncertainties may have significant impact on our understanding of galaxy formation and evolution. Minimizing cosmic variance effects will require observing samples at depth comparable to the VVDS but over areas much larger than the few square degrees explored so far from spectroscopic surveys. The improved counts presented in this paper are enabling a more accurate view of the galaxy population over 0 ≤ z ≤ 5, an important input to prepare for future surveys. Table 2. VVDS counts vs. redshift, in redshift bins of dz = 0.1, scaled to the number of galaxies per square degree, for different magnitude selection