I think the numbers are stamped on the cassette - just can't tell you where since I didn't ride my bike in today. I just replaced one, and the mechanic just took a look at the old one to verify what it was - he did it while I was standing there, and he certainly didn't count.
--- Denise