The sum of the digits of all counting numbers less than 13 is

$$
1+2+3+4+5+6+7+8+9+1+0+1+1+1+2=51
$$

Find the sum of the digits of all counting numbers less than 1000.
The counting numbers less than 1000 are simply the three-digit numbers, as long as we allow numbers to start with 0 (except the number 000, but including this does not affect the digit sum).

Each of the ten digits appears as a hundreds digit 100 times, because it can be paired with any of the 10 tens digits and the 10 units digits. So the sum of the 1000 hundreds digits is

$$
100(0+1+2+3+4+5+6+7+8+9)=100 \cdot 45=4500
$$

Similarly, every digit appears as a tens digit 100 times and as a units digit 100 times, so the sums of the tens digits and of the units digits are also 4500 . Consequently, the sum of all the digits is $3 \cdot 4500=13500$.