Generating functions. Number of solutions of equation. 
Let's consider two equations
$x_1+x_2+\cdots+x_{19}=9$, where
$x_i \le 1$
and
$x_1+x_2+\cdots+x_{10}=10, $ where $ x_i \le 5$
The point is to find whose equation has greater number of solutions

What I have found is:
number of solutions for first equation: $\binom{19}{9}=92378$
generating function for the second equation:
$$\left(\frac{1-x^6}{1-x}\right)^{10}=(1-x^6)^{10} \cdot (1-x)^{-10}$$
Here I completely do not know how to find number near $[x^{10}]$ coefficient.
Wolfram said that it is $85228$, so theoretically I have solution, but I would like to know more generic way how to solve such problems. Any ideas?

Generating functions is a generic way.
To continue on your attempt, you can apply Binomial theorem, which applies to negative exponents too!
We have that
$$ (1-x)^{-r} = \sum_{n=0}^{\infty} \binom{-r}{n} (-x)^n$$
where 
$$\binom{-r}{n} = \dfrac{-r \times (-r -1) \times \dots \times (-r - n +1)}{n!} = (-1)^n\dfrac{r(r+1)\dots(n+r-1)}{n!} $$
Thus
$$ \binom{-r}{n} =(-1)^n\binom{n + r- 1}{n}$$
And so
$$ (1-x)^{-r} = \sum_{n=0}^{\infty} \binom{n +r -1}{n} x^n$$
Now your problem becomes finding the coefficient in the product of two polynomials, as you can truncate the infinite one for exponents $\gt 10$.
I will leave that to you.
