for $|f (x_1) + ... + f (x_n)| \le M$ how to prove that $S=\{ x\in [0,1]:f(x)\ne 0\}$ is countable? 
Let f be a real-valued function defined for every $x$ in the interval
  $0\le x \le 1$. Suppose there is a positive number M having the following
  property: for every choice of a finite number of points $x_1, x_2, ..., x_n$ in the
  interval $0 \le x \le  1$, the sum
  $$|f (x_1) + ... + f (x_n)|  \le M$$
  Let $S$ be the set of those $x$ in $0 \le x \le 1$ for which $f(x) \neq 0$. Prove that $S$
  is countable.

I am having hard time to understand it's solution. The solution is as follows.

Proof : Let $S_n = \{x \in [0, 1] : |f (x)| \ge 1/n\}$ , then $S_n$ is a finite set by
  hypothesis. In addition, $S = \cup_{n=1}^\infty S_n$. So, S is countable.

There are infinite irrationals between $0$ and $1$, how does defining taking $x$ such that $|f(x)| \ge 1/n$ prove that the set is countable. Aren't we counting irrationals as well as rationals between $0$ and $1$? 
I think it would be more intuitive to begin by assuming that the set $S$ in uncountable and arrive at contradiction that $|f (x_1) + ... + f (x_n)|$ is bounded. But I don't know how. Can we do this way?
Also can anyone elaborate that proof from manual so that I can understand?
 A: To see that each $S_n$ is finite, suppose it is at least countable. Then there are either at least countably many positive or negative $x$ in it, but without loss of generality assume there are positive. Then pick an integer $k$ such that $\dfrac{k}{n} > M \Rightarrow k > Mn$. Then since every $f(x) > \dfrac{1}{n}$, and by hypothesis there are infinitely many such $x$ in $S_n$, pick $k$ of them, and then 
$$|f(x_1) + \cdots + f(x_k)| > \underbrace{\left|\frac{1}{n} + \cdots + \frac{1}{n}\right|}_{k \text{ times}} > \frac{k}{n} > M$$
contradicting the hypothesis, that is, showing that there are no more than $k$ positive numbers in $S_n$. That method does count both irrationals and rationals. For any $x$ such that $|f(x)|>0$, it is contained in $S_n$ as soon as $|f(x)| > \dfrac{1}{n}$, which since $\left\{\dfrac{1}{n}\right\}_{n\in\mathbb{N}}$  converges to $0$ is bound to happen. The proof has nothing specific to do with rationals, it just picked a convenient positive sequence which converges to $0$, and any other would just as well worked (say $\left\{\dfrac{\pi}{n}\right\}_{n\in\mathbb{N}}$).
The proof the proceeds by noting that union of countable collection of finite sets is countable. You can see a proof of a stronger fact here.
