TITLE: Prove the support of a real function is countable
QUESTION [5 upvotes]: This is a problem from my real analysis homework. We are learning the countable sets, and have yet to reach uncountable sets.

Let $f$ be a real function defined on $[0, 1]$. There exists a constant $M$, such that for each finite $n$, and $0 \le x_1 < x_2 < \cdots < x_n \le 1$, we have
$$
|f(x_1) + f(x_2) + \cdots + f(x_n)| \le M.
$$
Prove $E \stackrel{\text{def}}{=} \{x \in [0, 1] : f(x) \ne 0\}$ is countable.

My attempt
I split $E$ into two parts,
$$
\begin{align}
E^{+} &\stackrel{\text{def}}{=} \{x \in [0, 1] : f(x) > 0\} \\
E^{-} &\stackrel{\text{def}}{=} \{x \in [0, 1] : f(x) < 0\}
\end{align}
$$
A classmate suggested considering $f(x) > \frac{1}{n}$ and $f(x) \le \frac{1}{n}$ from $E^{+}$ separately, and proving for each $n$ both part have finite amount of elements, but I didn't gain much from her hint.
Another path I have taken is letting
$$
\begin{align}
E' &\stackrel{\text{def}}{=} \{x \in E : \exists \delta_x > 0, (x, x+\delta_x) \cap E = \varnothing \} \\
E'' &\stackrel{\text{def}}{=} E \setminus E'
\end{align}
$$
I can prove $E'$ is countable, but $E''$ is still tricky even though it contains less or equal elements than $E$.
Proof by contradiction didn't yield any significant result, either.

REPLY [9 votes]: A classmate suggested considering $f(x) > \frac{1}{n}$ and $f(x) \le \frac{1}{n}$ from $E^{+}$ separately, and proving for each $n$ both part have finite amount of elements, ...

Your classmate is on the right track, but it suffices to show that there are (at most) finitely many points with  $f(x) > \frac{1}{n}$ in  $E^{+}$.
For each $n \in \Bbb N = \{ 1, 2, 3, \ldots \}$ define 
$$
E^{+}_n = \left\{x \in [0, 1] : f(x) > \frac 1n \right\}
$$
Then $E^{+}_n$ has at most $nM$ elements. It follows that
$$
 E^{+} = \bigcup_{n \in \Bbb N} E^{+}_n = \{x \in [0, 1] : f(x) > 0\}
$$
is countable (as the countable union of finite sets).
In the same way (or by applying the above argument to $-f$) it can be shown that $E^{-}$ is countable as well.
Remark: The domain of $f$ (in your case: the interval $[0, 1]$) is irrelevant for this conclusion. The same statement holds for a real-valued function $f$ defined on an arbitrary set $X$.