Number of terms in the expansion of $(x_{1}+x_{2}+x_{3}+.....+x_{n})^{r}$ is equal to the number of integral solution of non-negative integers.
Using star and bars:
we can write like this $x_{1}+x_{2}+x_{3}+.....+x_{n}=r$ $where$ $x_{1},x_{2},x_{3},...,x_{n}\geq0$
Number of solutions$=\binom{n+r-1}{r}=\binom{n+r-1}{n-1}$
Given that $(x+y+z+w)^{3}$
we can write like this $x+y+z+w=3$ $where$ $x,y,z,w\geq0$
Number of solutions $(or)$ number of terms$ = \binom{4+3-1}{3}=\binom{6}{3}=\frac{6!}{3!.3!}=\frac{6\times5\times4\times3!}{3!.3!}=20$