How many different terms are there in the expansion of (x+y+z)^20?
If we select $N$ items from $K$ different choices (where repetition is allowed), the number of ways that can be done is $\dbinom{N+K-1}{N}$.
In expanding $( x+ y+ z)^{20}$ each term looks like $Ax^jy^kz^m$ where $j+k+m=20$.
So we are choosing $20$ ones from $3$ kinds: $\dbinom{22}{2}$.
Read about here.