Measurement of charged particle spectra in pp collisions at CMS