How many n-th Order Partial Derivatives Exist for a Function of k Variables?

This is the problem of distributing $n$ balls over $k$ bins, which can be solved using the stars and bars approach; the result is

$$\binom{n+k-1}{k-1}\;.$$


In the noncommutative case (I know you weren't asking for it, but I will include it for the sake of completeness), the process of generating the sum of all the derivatives is nothing but the successive application of the differential operator $$\left(\frac{\partial}{\partial x_1}+...+\frac{\partial}{\partial x_k}\right)$$

For instance, if $k=2$

$$\left(\frac{\partial}{\partial x}+\frac{\partial}{\partial y}\right)f=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}$$

I will develop an example with $k=3$. One good way of calcualting all the derivatives is to draw a table. In the first column I write the operators. In the first row, I write all the functions to which the operators shall be applied. The entries of the table are the results of applying the corresponding operator to the functions. Let's say then that $f=f(x,y,z)$. The process of obtaining all the first order partial derivatives of $f$ could be described by

\begin{array}{cc} & f\\ \frac{\partial}{\partial x} & \frac{\partial f}{\partial x}\\ \frac{\partial}{\partial y} & \frac{\partial f}{\partial y}\\ \frac{\partial}{\partial z} & \frac{\partial f}{\partial z} \end{array}

To get all the second order derivatives, we just use all the entries of this table as the target functions of another table, say

\begin{array}{cccc} & \frac{\partial f}{\partial x} & \frac{\partial f}{\partial y} & \frac{\partial f}{\partial z}\\ \frac{\partial}{\partial x} & \frac{\partial^{2}f}{\partial x^{2}} & \frac{\partial^{2}f}{\partial x\partial y} & \frac{\partial^{2}f}{\partial x\partial z}\\ \frac{\partial}{\partial y} & \frac{\partial^{2}f}{\partial y\partial x} & \frac{\partial^{2}f}{\partial y^{2}} & \frac{\partial^{2}f}{\partial y\partial z}\\ \frac{\partial}{\partial z} & \frac{\partial^{2}f}{\partial z\partial x} & \frac{\partial^{2}f}{\partial z\partial y} & \frac{\partial^{2}f}{\partial z^{2}} \end{array}

The third order derivatives

\begin{array}{cccccccccc} & \frac{\partial^{2}f}{\partial x^{2}} & \frac{\partial^{2}f}{\partial x\partial y} & \frac{\partial^{2}f}{\partial x\partial z} & \frac{\partial^{2}f}{\partial y\partial x} & \frac{\partial^{2}f}{\partial y^{2}} & \frac{\partial^{2}f}{\partial y\partial z} & \frac{\partial^{2}f}{\partial z\partial x} & \frac{\partial^{2}f}{\partial z\partial y} & \frac{\partial^{2}f}{\partial z^{2}}\\ \frac{\partial}{\partial x} & \frac{\partial^{3}f}{\partial x^{3}} & \frac{\partial^{3}f}{\partial x^{2}\partial y} & \frac{\partial^{3}f}{\partial x^{2}\partial z} & \frac{\partial^{3}f}{\partial x\partial y\partial x} & \frac{\partial^{3}f}{\partial x\partial y^{2}} & \frac{\partial^{3}f}{\partial x\partial y\partial z} & \frac{\partial^{3}f}{\partial x\partial z\partial x} & \frac{\partial^{3}f}{\partial x\partial z\partial y} & \frac{\partial^{3}f}{\partial x\partial z^{2}}\\ \frac{\partial}{\partial y} & \frac{\partial^{3}f}{\partial y\partial x^{2}} & \frac{\partial^{3}f}{\partial y\partial x\partial y} & \frac{\partial^{3}f}{\partial y\partial x\partial z} & \frac{\partial^{3}f}{\partial y^{2}\partial x} & \frac{\partial^{3}f}{\partial y^{3}} & \frac{\partial^{3}f}{\partial y^{2}\partial z} & \frac{\partial^{3}f}{\partial y\partial z\partial x} & \frac{\partial^{3}f}{\partial y\partial z\partial y} & \frac{\partial^{3}f}{\partial y\partial z^{2}}\\ \frac{\partial}{\partial z} & \frac{\partial^{3}f}{\partial z\partial x^{2}} & \frac{\partial^{3}f}{\partial z\partial x\partial y} & \frac{\partial^{3}f}{\partial z\partial x\partial z} & \frac{\partial^{3}f}{\partial z\partial y\partial x} & \frac{\partial^{3}f}{\partial z\partial y^{2}} & \frac{\partial^{3}f}{\partial z\partial y\partial z} & \frac{\partial^{3}f}{\partial z^{2}\partial x} & \frac{\partial^{3}f}{\partial z^{2}\partial y} & \frac{\partial^{3}f}{\partial z^{3}} \end{array}

You can see that the sum of all third order derivatives, given in this case by

$$\left(\frac{\partial}{\partial x}+\frac{\partial}{\partial y}+\frac{\partial}{\partial z}\right)^{3}f$$

Can be calculated simply by summing the entries of this third order table. It's obvious how this can be used for a function of $k$ variables. In each step the table will have $k\times(number\: of\: input\: functions)$ resulting derivatives. Starting with just $f$ as input function, you will have $k^n$ $n^{th}$ order derivatives.

In the fully commutative case, on the other hand, I agree with Joriki. As he said, the procedure is explained in Stars and Bars and Multisets-Counting Multisets. And the result is

$$N_{PD}=\left(\left(\begin{array}{c} k\\ n \end{array}\right)\right)=\left(\begin{array}{c} k+n-1\\ n \end{array}\right)=\left(\begin{array}{c} k+n-1\\ k-1 \end{array}\right)$$

Where $\left(\left(\begin{array}{c} k\\ n \end{array}\right)\right)$ is the multiset counting number.