I will use letters as objects. In general, suppose we have objects $\underbrace{X_1, \dotsc, X_1}_{n_1}, \underbrace{X_2, \dotsc, X_2}_{n_2}, \dotsc,\dotsc, \dotsc, \underbrace{X_k, \dotsc, X_k}_{n_k}$. Then what is the number of ways we can choose and order $N$ objects $0 \leq N \leq n_1 +\dotsb + n_k$, i.e. the number of permutations? If $n_1 = \dotsb = n_k = 1$, then of course this is just a standard permutation problem. I am just curious if there is a formula for it.
Note: I initially asked about combinations, which was pointed out to be a duplicate of the question here. I have deleted the original post to ask this question, instead.