Non-linear evolution is sometimes modelled by assuming there is a deterministic mapping from initial to final values of the locally smoothed overdensity. However, if an underdense region is embedded in a denser one, then it is possible that its evolution is determined by its surroundings, so the mapping between initial and final overdensities is not as ‘local’ as one might have assumed. If this source of non-locality is not accounted for, then it appears as stochasticity in the mapping between initial and final densities. Perturbation theory methods ignore this ‘cloud-in-cloud’ effect, whereas methods based on the excursion set approach do account for it; as a result, one may expect the two approaches to provide different estimates of the shape of the non-linear counts in cells distribution. We show that, on scales where the rms fluctuation is small, this source of non-locality has only a small effect, so the predictions of the two approaches differ only on the small scales on which perturbation theory is no longer expected to be valid anyway. We illustrate our results by comparing the predictions of these approaches when the initial–final mapping is given by the spherical collapse model. Both are in reasonably good agreement with measurements in numerical simulations on scales where the rms fluctuation is of the order of unity or smaller. If the deterministic mapping from initial conditions to final density depends on quantities other than the initial density, then this will also manifest as stochasticity in the mapping from initial density to final. For example, the Zeldovich approximation and the ellipsoidal collapse model both assume that the initial shear field plays an important role in determining the evolution. We compare the predictions of these approximations with simulations, both before and after accounting for the ‘cloud-in-cloud’ effect. Our analysis accounts approximately for the fact that the shape of a cell at the present time is different from its initial shape; ignoring this makes a noticeable difference on scales where the rms fluctuation in a cell is of the order of unity or larger. On scales where the rms fluctuation is 2 or less, methods based on the spherical model are sufficiently accurate to permit a rather accurate reconstruction of the shape of the initial distribution from the non-linear one. This can be used as the basis for a method for constraining the statistical properties of the initial fluctuation field from the present-day field, under the hypothesis that the evolution was purely gravitational. We illustrate by showing how the highly non-Gaussian non-linear density field in a numerical simulation can be transformed to provide an accurate estimate of the initial Gaussian distribution from which it evolved.