For each degree 17 polynomial f with real coefficients, let sf be the number of real roots (counted with multiplicity). Let S be the set of all possible values of sf. What is |S|?

To find the number of possible values of S, we need to consider the number of real roots for different degrees of polynomials.

For a degree 1 polynomial, we have a linear equation of the form f(x) = ax + b. Here, there is only one possible value for sf, either 0 or 1, depending on whether a is 0 or not. So, for degree 1, |S| = 2.

For a degree 2 polynomial, we have a quadratic equation of the form f(x) = ax^2 + bx + c. To determine the number of real roots, we can consider the discriminant, which is b^2 - 4ac. If the discriminant is positive, there are two real roots, if it is zero, there is one real root, and if it is negative, there are no real roots. Therefore, for degree 2, |S| = 3.

Now, let's consider higher degree polynomials. It is a well-known result in algebra that a polynomial of odd degree always has at least one real root. Therefore, for odd degrees, there is a minimum of one real root and sf can take on all positive integer values greater than or equal to one. Since there are infinitely many positive integers, for odd degrees, |S| is infinite.

On the other hand, for even degrees, there might be zero or multiple real roots. Hence, sf can take on all possible non-negative integer values. Since there are infinitely many non-negative integers, for even degrees, |S| is also infinite.

In summary:
- For odd degrees, |S| is infinite.
- For even degrees, |S| is infinite.
- For degree 1, |S| = 2.
- For degree 2, |S| = 3.

Therefore, the number of possible values of S, |S|, is infinite.