Descartes' Rule of Signs gives an upper bound on the number of positive and negative real roots of a real polynomial. These bounds on the number of roots count with multiplicity.
Descartes' algorithm is simple. Write a polynomial with its terms in ascending (or descending) degree order. Next, list the coefficients ignoring any zeros and count the number of times the list of numbers switches from positive to negative or vice-versa. Descartes found that the number of sign changes in the list of coefficients gives an upper bound on the number of positive real roots of that polynomial. In fact, if there are $s$ sign changes, then this polynomial has $s-2k$ positive real roots for some positive integer $k$.
For example, if $s=3$, then there are either 3 or 1 positive real roots. On the other hand if $s=4$, then there are either 4, 2, or no positive real roots.
If $r$ is a negative real root of $f(x)$, then $-r$ is a positive real root of $f(-x)$. Thus Descartes' Rule of Signs can also be used to give an upper bound on the number of negative real roots. We simply apply this same technique to $f(-x)$.
The computation above is powered by SageMath. The Sage code is embedded in this webpage's html file. To view the code instruct your browser to show you this page's source. For example, in Chrome, right-click and choose "View page source".