Assumed you have balls with three different colors in an urn. From each type of ball you have four pieces that are not distinguishable. How many ways are there to pick five balls out of the urn?
Or in general with balls in $k$ different colors and $m$ balls of each of the color how many ways are there to pick $n$ balls out of the urn?
The problem is easy if $n \leq m$. Then it is just an unordered selection with repetition allowed. Therefore there are $\binom{k+n-1}{n}$ ways to pick. But if $n > m$ repetition is not necessarily allowed and I cannot find a beautiful way to calculate the number of ways. For small examples I might be able to find the solution step by step but on a larger scale I need help.
If you compute $$f(x):=(1+x+x^2+\ldots+x^m)^k$$ by multiplying distributively you obtain for each legal pick of $m_1$, $m_2$, $\ldots$, $m_k$ balls with total $m_1+m_2+\ldots+m_k=n$ a term $x^{m_1+m_2+\ldots+m_k}=x^n$. We therefore have to compute the coefficient of $x^n$ in the expansion $$f(x)=\left({1-x^{m+1}\over1-x}\right)^k=\sum_{j=0}^k{k\choose j}\bigl(-x^{m+1}\bigr)^j\cdot\sum_{l=0}^\infty{k+l-1\choose l}\,x^l\ .$$ Collecting terms we obtain a finite alternating sum of products of binomial coefficients. This sum can be interpreted combinatorially as result of a certain inclusion/exclusion process. Maybe someone will put forward a solution in this other realm.