Some of the most spectacular failures of density-functional and Hartree-Fock theories are related to an incorrect description of the so-called static electron correlation. Motivated by recent progress on the N-representability problem of the one-body density matrix for pure states, we propose a way to quantify the static contribution to the electronic correlation. By studying several molecular systems we show that our proposal correlates well with our intuition of static and dynamic electron correlation. Our results bring out the paramount importance of the occupancy of the highest occupied natural spin-orbital in such quantification.