How many ways are there to put N distinct balls in K distinct boxes such that each box has a max of C balls? Ordering of balls within boxes is not relevant.
For instance, the ways you can distribute $5$ distinct balls in $3$ distinct bins would be just $3^5$. But if we place the constraint that each bin can have at the max of $3$ balls, we are left only with the possibilities = $\{(3,2,0)\times3!, (3,1,1)\times(3!/2!), (2,2,1)\times(3!/2!)\}$ instead of the total $3^5$ possibilities.
There is not a simple closed formula, but you can give an answer using exponential generating functions. The number of ways to distribute $n$ distinct items into $k$ distinct boxes with a capacity of $C$ is $$ n!\cdot [x^n]\left(\sum_{i=0}^{C} \frac{x^i}{i!}\right)^k $$ Here, $x$ is a "dummy variable", and the notation $[x^n]f(x)$ means the coefficient of $x^n$ in the polynomial $f(x)$.
This formula is useful, because any computer algebra system can compute it for you. For example, here is how you use Wolfram Alpha or Mathematica to determine there are $210$ ways to distribute $5$ distinct balls into $3$ distinct bins, each with a capacity of $3$ balls: Wolfram Alpha link.
The reason this works is that when you expand out the above product, and collect all terms with a factor of $x^n$, then you get a sum of fractions like $$\frac{n!}{n_1!n_2!\cdots n_k!},$$ where $(n_1,\dots,n_k)$ is a list of numbers summing to $n$, each being an integer between $0$ and $C$. This represents the distribution where the $j^\text{th}$ box has $n_j$ balls, for $j\in \{1,\dots,k\}$. For more information about the exponential generating function method, see generatingfunctionology, chapter 3, which is available for free online.