It is true that if a polynomial function has $n$ critical points (maxima or minima), then the degree of the polynomial is at least $n+1$.
You can think of $\sin(x)$ as a polynomial of infinite degree. Using Taylor's Theorem,
$$
\sin(x) = x-\frac{x^3}{6}+\frac{x^5}{120}-\frac{x^7}{5040}+\frac{x^9}{362880}-\frac{x^{11}}{39916800}+\frac{x^{13}}{6227020800}+\ldots.
$$
The denominator of a term with exponent $n$ is $n!$, so the well known summation formula for $\sin(x)$ is
$$
\sin(x) = \sum_{m=1}^\infty (-1)^{m-1} \frac{x^{2m-1}}{(2m-1)!}
$$
where $2m-1$ is just the odd positive natural numbers.
Now taking the derivative of each term, we get
$$
\frac{\partial}{\partial x} \sin(x) = 1-\frac{x^2}{2}+\frac{x^4}{24}-\frac{x^6}{720}+\frac{x^8}{40320}-\frac{x^{10}}{3628800}+\frac{x^{
12}}{479001600}-\ldots
$$
which happens to be $\cos(x)$, thus
$$
\frac{\partial}{\partial x} \sin(x)=\cos(x).
$$
This derivation can be found in several calculus books.
The fact that the denominators grow much faster than the exponents prevents the summation from reaching infinity. This is much like one of Zeno's paradoxes
"Suppose Homer wishes to walk to the end of a path. Before he can get there, he must get halfway there. Before he can get halfway there, he must get a quarter of the way there. Before traveling a quarter, he must travel one-eighth; before an eighth, one-sixteenth; and so on."
The point is that the sum of an infinite number of positive numbers is not necessarily infinite. In the same way, the derivative of an infinite degree polynomial is not necessarily infinite. There is no one term in the expansion of $\sin(x)$ that has infinite degree, and the terms become small enough that their sum is not infinite.
If you think that there are gaps in the reasoning above, you are right. It takes math majors years to get to the point where they can prove each step rigorously.
Hope that helps.
PS: We often down vote questions from people who are just beginning calculus or have not even begun calculus. Is that correct?