Suppose one is looking at the general expansion of $$ (a_1 + a_2 + a_3\,\, +\,\, ...\,\, +\,\, a_k)^n $$ where $a_k > 0 \,\,\,\,\forall k \in \mathbb{Z}$
Is there a formula that will yield the amount of terms that the resulting expansion will contain?
For example, the binomial expansion $(a+b)^n$ always has $(n+1)$ terms. Is there a way to generalize this?
Here, we know that $ (a+b)^n = \sum\limits_{r=0}^{n} {^nC_r}\,a^rb\,^{n-r}$ will have $\mathbf{n+1}$ terms.
Or, we can say that it has ${\mathbf{^{n+1}C_1}}$ terms.
Let us look at an example now.
$$(a+b+c)^2 = a^2+b^2+c^2+2ab+2bc+2ca$$
Now, talking about $(a+b+c)^n$ and using Binomial theorem, $$ (a+b+c)^n = \sum\limits_{r=0}^{n} {^nC_r}\,(a+b)^rc^{n-r}$$
Now note that for this particualr term $${^nC_r}\,(a+b)^rc^{n-r}$$
if $r=0$, this term will further expand into $1$ term
if $r=1$, this term will further expand into $2$ term
if $r=2$, this term will further expand into $3$ term and so on ...
$ \implies {^nC_r}\,(a+b)^rc^{n-r}$ will further expand into $\mathbf {r+1}$ terms.
Thus, total number of terms in $\sum\limits_{r=0}^{n} {^nC_r}\,(a+b)^rc^{n-r}$ $= 1 + 2+3+....+(n+1)= \frac{(n+2)(n+1)}{2}$
Or we can say that the total number of terms are $\mathbf{ {^{n+2}C_2}}$
Hence, it gives us an intuition of number of terms in $$(a_1+a_2+a_3+.....+a_k)^n \quad is\quad \mathbf{ {^{n+k-1}C_{k-1}}}$$
We can verify it.
If we expand $(a+b+c+d)^2$ we'll get 10 terms $$(a+b+c+2)^2 = a^2+b^2+c^2+d^2+2ab+2cd+2ac+2ad+2bc+2bd$$
which is same as taking $n=2$ and $k=4$ $\implies {^{2+4-1}C_{4-1}} = {^{2+3}C_{3}} = 10$
Hope that helps.