I have a list of the numbers from 1 to 1000.

How can I find the number of 0's, 1's, 2's, and 9's that are used?

The answers are 192, 301, 300, 300 respectively, but I'm interested in the process itself.

Just an explanation for one of these digits will suffice, I'll then be able to solve for the other 3 cases.