【Example 3】Between 1 and $10^{6}$, how many integers have the sum of their digits equal to 9?
Just imagine the problem as "placing 9 indistinguishable balls into 6 different boxes at random," and you will know that the number of such integers is $C_{9+6-1}^{g}=C_{14}^{5}$ $=2002$.