Looking for a proof that the number of non-zero derivatives of a polynomial $f(x)$ is equal to the number of its roots I can see why this works for a root $p$ with multiplicity $k\geq 1$, when $f(x)=(x-p)^k$.
But, why is that true if $f(x)=(x-x_1)(x-x_2)\cdots(x-x_n)$ has distinct roots $x_1\neq x_2\neq \cdots \neq x_n$?
Is it something to do with Lagrange's Mean Value Theorem?
 A: Throughout, suppose we're working over a field of characteristic $0$.
Let
$$f(x) = \displaystyle \sum_{k=0}^n a_kx^k$$
be a polynomial of degree $n$, so that $a_n \ne 0$. Then its derivative
$$f'(x) = \displaystyle \sum_{k=0}^{n-1} (k+1)a_{k+1}x^{k}$$
has leading coefficient $na_n$, which is nonzero if $n>0$. So if $n>0$ then this has degree $n-1$. Apply some sort of induction argument and you'll see that this implies that a polynomial of degree $n$ (over a field of characteristic $0$) has exactly $n$ nonzero derivatives, and that its $(n+1)^{\text{th}}$ derivative is $0$.
So if you're working over $\mathbb{C}$ then a consequence of the fundamental theorem of algebra is that
$$\#\text{nonzero derivatives} = \deg f = \#\text{roots}$$
This is true over any algebraically closed field of characteristic $0$. In fact, it's true for a polynomial of degree $n$ over any algebraically closed field of characteristic $0$ or $p>n$.
A: The statement is not true over all functions and fields, but is certainly true of polynomials over the complex numbers.  This is known as the fundamental theorem of algebra.
