We present a method to compute the number of particles occupying spherical single-particle (SSP) levels within the energy density functional (EDF) framework. These SSP levels are defined for each nucleus by performing self-consistent mean-field calculations. The nuclear many-body states, in which the occupation numbers are evaluated, are obtained with a symmetry conserving configuration mixing (SCCM) method based on the Gogny EDF. The method allows a closer comparison between EDF and shell model with configuration mixing in large valence spaces (SM-CI) results, and can serve as a guidance to define physically sound valence spaces for SM-CI calculations. As a first application of the method, we analyze the onset of deformation in neutron-rich N = 40 isotones and the role of the SSP levels around this harmonic oscillator magic number, with particular emphasis in the structure of 64 Cr.