Added total spectra count to inventory() function.