How do I find the number of solutions of the equation $r_1 + r_2 + … + r_k = n$

I was studying the multinomial theorem: $(u_1+u_1+...u_k)^n=\sum\limits_{r_1+r_2+...r_k=n}\dfrac{n!}{r_1!r_2!...r_k!}u_1^{r_1}u_2^{r_2}...u_k^{r_k}$

and my book said that the number of terms in the expansion of a polynomial using the multinomial theorem is equal to the the number of solutions of

the equation $r_1 + r_2 + .... + r_k = n$

$n \in N$;

$0\leq r_i \leq n$; $r_i \in W$; $i=0,1,2,..,k$;

I know that the answer to this is $\binom{n+k-1}{k-1}$ but I do not know how to get this result. Please help me out here.

So there will be $k-1$ barriers and the permutations of n like objects and $k-1$ barriers are
$$\frac{^{n+k-1}P_{k-1}}{n!}$$ Which is $$^{n+k-1}C_{k-1}$$