"How Many Whole Numbers..."
I bet you have seen a question like this before! Why do we keep getting this type of questions? One word: Overcount. There are usually lots of overlapping cases, and if you are not careful, you can easily fall for them. Treat such questions as a permutation problem where each distinct position has up to 9 (left-most digit) or 10 choices, apply the constraints which are usually there (even number only, between 1 - 5, etc.), be careful with overcount (use complimentary if it makes your life easier), and you should be fine.