I came across a question recently that I did not know how to do. It included a solution, and basically the question boiled down to how many positive integers are there with 10 or less digits such that the sum of its digits is equal to 9? The solution then finished by saying the answer with simply a combination with n=18 and r=9 (=48620) by "a standard balls-in-boxes argument."
I looked up arguments that sounded like this one, and did not understand them or how they related to this problem.
What I have come to ask you guys is, generally, what does that argument entail and how does it relate to the specific type of problem?
This is what is often called a Stars and Bars argument. Please see the linked Wikipedia article. You will also find many hits on MSE.
The argument applies only in a limited way to sums of digits problems. But it works with this one.
The Stars and Bars technique counts the number of ways $n$ indistinguishable balls can be put into $k$ distinguishable boxes. Equivalently, it counts the number of solutions of the equation $x_1+x_2+\cdots+x_k=n$ in non-negative integers.
The Stars and Bars technique shows that the number of solutions is given by $\binom{n+k-1}{k-1}$, or equivalently $\binom{n+k-1}{n}$.
To construct a $10$ or fewer digit number with digit sum $9$, let the digits from left to right be $x_1$ to $x_{10}$. Then our number has digit sum $9$ if and only if $x_1+\cdots+x_{10}=9$. So we have a Stars and Bars problem with $n=9$ and $k=10$.
Unfortunately, this simple technique does not work for, say, digit sum $29$. True, Stars and Bars lets us count the number of solutions of $x_1+x_2+\cdots+x_{10}=29$ in non-negative integers. But many of these solutions involve some $x_i\gt 9$, and these do not give us decimal digits.