An open question in cosmology and the theory of structure formation is to what extent does environment affect the properties of galaxies and haloes. The present paper aims at shedding light on this problem. The paper focuses on the analysis of a dark matter only simulation and it addresses the issue of how the environment affects the abundance of haloes, which are are assigned four attributes: their virial mass, an ambient density calculated with an aperture that scales with R vir (∆ M ), a fixedaperture (∆ R ) ambient density, and a cosmic web classification (i.e. voids, sheets, filaments, and knots, as defined by the V-web algorithm). ∆ M is the mean density around a halo evaluated within a sphere of a radius of 5R vir , where R vir is the virial radius. ∆ R is the density field Gaussian smoothed with R = 4 h −1 Mpc, evaluated at the center of the halo. The main result of the paper is that the difference between haloes in different web elements stems from the difference in their mass functions, and does not depend on their adaptive-aperture ambient density. A dependence on the fixed-aperture ambient density is induced by the cross correlation between the mass of a halo and its fixed-aperture ambient density.