Let say we have an arbitrary polynomial over the reals, and we do not know whether it is separable or not. Is there some algorithm to find the number of roots it has in the complex number? 



Is there a way to find out how many distinct roots a polynomial has?
If $f(z) = \prod (z-z\_i)^{n\_i}$, with $z\_i$ distinct, then $GCD(f(z), f'(z)) = \prod (z-z\_i)^{n\_i-1}$, so the number of distinct complex roots is $\deg f - \deg GCD(f, f')$. If $f$ has rational coefficients, or in some other sense can be computed with exactly, this is a practical method; polynomial GCD can be computed by the Euclidean algorithm. If the coefficients of $f$ are only known approximately, then you need to think about what you mean by number of roots, since perturbing $x^2$ (one root) can give $x^2-\epsilon$ (two roots).


Also, if you meant to ask how many real roots there are, see [Sturm's theorem](https://en.wikipedia.org/wiki/Sturm's_theorem).


