(Perhaps) An Easy Combinatorics Problem: (Perhaps not so easy...)
Still have some difficulty with problems like this. 
Suppose I have Box with various buttons inside. For the sake of example, let the box contain: $$[ 4 \textrm{ Red}, 5 \textrm{ Blue}, 7 \textrm{ Green} ]$$ How many distinct tuples of, say, 5 buttons can I draw from the box? In the coordinates $(r,b,g)$ I can enumerate them:
$$\{(4,0,1),(4,1,0),(3,2,0),(3,1,1),(3,0,2),(2,3,0),(2,2,1),(2,1,2),(2,0,3),(1,4,0),(1,3,1),(1,2,2),(1,1,3),(1,0,4),(0,5,0),(0,4,1),(0,3,2),(0,2,3),(0,1,4),(0,0,5)\}$$
And I count twenty.
How do I do this in general?
Given a box (multiset) of buttons $B$,
$$B = \{B_1,B_2,\cdots,B_n\}$$
composed of $n$ different styles with respective sizes $|B_j|$ how many distinct $n$-tuples can I get by drawing $k$ buttons from such a box?
From the Selected Answer:
In the general case with my notation, we want the coefficient of $x^k$ in the expansion
$$P(x) = \Pi_{j=1}^n \frac{1-x^{|B_j|}}{1-x} $$
 for the number of distinct $k$-tuples selected from the box.
In the cases that I'm dealing with, I think I'll have a big $n$ but maybe a smallish $k$. It appears that writing out the whole inclusion-exclusion form is a bit of a bear. But I get the general way to solve this now.
Thanks!
 A: The generating function approach is to write:
$$(1+x+x^2+x^3+x^4)(1+x+\cdots + x^5)(1+x+\cdots + x^7) = \frac{(1-x^5)(1-x^6)(1-x^8)}{(1-x)^3}$$
The coefficient of $x^n$ is the number of ways of taking $n$ buttons out.
Now, $$\frac{1}{(1-x)^3} = \sum_{k=0}^\infty \binom{k+2}{2}x^k$$
And: $$(1-x^5)(1-x^6)(1-x^8)=1-x^5-x^6-x^8+x^{11}+x^{13}+x^{14}-x^{19}$$
So we see the coefficient of $x^n$ is:
$$\binom{n+2}{2} - \binom{n-3}{2} - \binom{n-4}{2} - \binom{n-6}{2} + \binom{n-9}{2}+\binom{n-11}{2} +\binom{n-12}{2} - \binom{n-17}{2}$$
Where the values of the binomial $\binom{M}{2}$ is taken to be zero when $M<2$.
This is the same value you'd get with an "inclusion/exclusion" argument.
In general, if your box has $R,G,B$ buttons of each color, the formula would be:
$$\binom{n+2}{2} - \binom{n+2-R}{2} - \binom{n+2-G}{2} - \binom{n+2-B}{2} + \binom{n+2-R-G}{2}+\binom{n+2-R-B}{2} +\binom{n+2-G-B}{2} - \binom{n+2-R-G-B}{2}$$
The value $2$ gets replaced by $k-1$ and the formula gets worse with $k$ buttons, but the above approach works.
A: If I understand you correctly, this is the number of weak compositions of a number. In your example you have the weak compositions of 5 into 3 parts. In general the number of weak compositions of n into k parts is $\binom{n+k-1}{k-1}$. In your example this gives 21. You missed {5,0,0}.
A: If Im not wrong I see 5 different values for red (from 0 to 4), 6 different values for blue and 7 different values for green.
You want that they sum exactly 5 (or starting from 1 instead of 0, 8). This is the coefficient of $x^5$ of this generating function:
$$f(x)=(1+x+x^2+x^3+x^4)(1+x+x^2+x^3+x^4+x^5)(1+x+x^2+x^3+x^4+x^5+x^6)$$
Hacking a bit trough wolfram we have that $[x^5]f(x)=20$.

But it is a lot faster, for this example of RGB, just evaluate the number of weak compositions for $5$ in $3$ parts and subtract the impossible ones due to the constraint.
Because the unique real constraint is the limit of $4$ on Red you only must subtract one case, the $(5,0,0)$ tuple.
Then it is $\binom{7}{2}-1=20$.
