Hydrogen atoms introduced into a bulk of rare earth-transition metal compound influence the electronic structure of the material. Additional electrons are expected to change the number of free electrons per volume unit present in the system. Electron energy-loss spectra were taken in the low-loss region up to 50 eV. In spectra for ErMn2 and ErMn2D 2 compounds, differences in the shape and position of the plasmon peak were observed. The dielectric functions were obtained from the energy-loss spectra using a Kramers-Kronig analysis. Different plasmon energies were found for both samples, and using the Drude model the numbers of free electrons per volume unit were calculated for pure and deuterated material. Significant differences were found, proving an increase of the free electron number per volume unit in the deuterated sample.