Number of real roots of a quintic polynomial
Solution 1:
Your approach is OK. Here is just another way.
By Descartes' rule of signs, $f(-x) = -x^5-x^3+2x+1$ has exactly one sign change, so there is exactly one negative real root.
As $f(x) = x^5+x^3-2x+1$ itself has two sign changes, we can have either no or two positive roots. We are left to show there is none, which can be observed by the following AM-GM: $$f(x) = x^5 + x^3 + 6\times \tfrac16 - 2x \geqslant \frac8{\sqrt[8]{6^6}}x -2x > 0$$ as $8 > 2\cdot 6^{3/4} \iff 4^4 > 6^3 \iff 256 > 216$ which is true.
Solution 2:
Your approach is correct, and the textbook misses the point. There is no direct relation between the number of zeros of $f'(x)$ and the number of zeros of $f(x)$, since derivatives ignore constant terms and (dually) integrals are only defined up to a constant.
(The number of zeros of $f'(x)$ plus one is an upper bound for the number of roots of $f(x)$, but the latter may go all the way down to zero, as pointed out in the comments on this answer.)