How many numbers from $1$ to $99999$ have the sum of the digits $= 15$? The problem: 

How many numbers from $1$ to $99999$ have the sum of the digits $= 15$? 

I thought of using the bitstring method and $x_1 + x_2 + x_3 + x_4 + x_5$ will be the boxes therefor we have $4$ zeros and $15$ balls. I'd say the answer would have to be $\binom{19}{15}$ is it right? 
 A: Your answer is incorrect since you have not considered the restriction that a digit in the decimal system cannot exceed $9$.
We want to find the number of positive integers between $1$ and $99~999$ inclusive that have digit sum $15$.  Since $0$ does not have digit sum $15$, we get the same answer by considering nonnegative numbers less than or equal to $99~999$ with digit sum $15$.  
A nonnegative number with fewer than five digits such as $437$ can be viewed as a string of five digits by appending leading zeros.  In this case, $437$ can be represented as the string $00437$.  Hence, we can view the problem as finding the number of five-digit decimal strings with digit sum $15$.  Hence, we seek the number of solutions in the nonnegative integers of the equation 
$$x_1 + x_2 + x_3 + x_4 + x_5 = 15 \tag{1}$$
subject to the restrictions that $x_j \leq 9$ for $1 \leq j \leq 5$.  
As you determined, the number of solutions of equation 1 is 
$$\binom{15 + 5 - 1}{5 - 1} = \binom{19}{4} = \binom{19}{15}$$
From these, we must subtract those solutions in which one or more of the variables exceeds $9$.  Since $2 \cdot 10 = 20 > 15$, at most one of the variables can exceed $9$.  
Suppose $x_1 > 9$.  Then $x_1' = x_1 - 10$ is a nonnegative integer.  Substituting $x_1' + 10$ for $x_1$ in equation 1 yields 
\begin{align*}
x_1' + 10 + x_2 + x_3 + x_4 + x_5 & = 15\\
x_1' + x_2 + x_3 + x_4 + x_5 & = 5 \tag{2}
\end{align*}
Equation 2 is an equation in the nonnegative integers with 
$$\binom{5 + 5 - 1}{5 - 1} = \binom{9}{4}$$
solution.  By symmetry, there are $\binom{9}{4}$ solutions that violate the restrictions for each of the five variables that could exceed $9$.  Hence, the number of positive integers less than or equal to $99~999$ with digit sum $15$ is 
$$\binom{19}{4} - \binom{5}{1}\binom{9}{4}$$
