System, method, and apparatus for determining the composition of a sample of material. In one embodiment, the method pertains to the counting of photons that were inelastically scattered by the sample, and for minimizing the effects of fluorescent or phosphorescent photons. In yet another embodiment of the invention, a sample is illuminated by a repetitive pulse of monochromatic light, and the resultant scattered photons from the samples are collected and counted during a predetermined integration period. Yet other embodiments pertain to a low-cost, computer-controlled system for repetitively counting inelastically scattered photons so as to create a Raman histogram and a Raman spectrogram of the photons.