I would like to calculate the maximum number of polynomial terms given a certain number of variables and a certain degree. eg. given that the number of variables is 2 and the degree is 3, the maximum number of terms is 9:
$$
    x_1^3 + x_1^2 x_2 + x_1 x_2^2 + x_2^3+ x_1^2 +x_1 x_2 + x_2^2 + x_1 + x_2    
$$
How do I do this? Thanks for answering.