Calculations of the inelastic mean free path of electrons (IMFP) from the predictive formulas TPP-2M require knowledge of the number of valence electrons, N v , for atoms constituting the solid. Comparison of the IMFPs obtained from TPP-2M with the IMFPs derived from the elastic electron backscattering can be a tool, in principle, to verify the criteria for selecting a proper number of valence electrons for elements, N v . In particular, the role of the 4f electrons in the case of lanthanides is presently verified on example of samarium. We found a substantial difference between IMFPs calculated from the TPP-2M formula and from elastic peak electron spectroscopy. This difference decreases only slightly when the 4f electrons are included in N v .