I read the proof of the following statement:
$f: [0,1] \rightarrow \mathbb{R}$ non-decreasing. Then $f \in L^1.$ Where $L^1$ denotes the set of lebesgue-integrable functions.
Proof:
Let $N$ be the set of discontinuous points of $f$. At every point of $x \in N$ there exists due to monotonicity of $f$ both left and right limit $L_x, R_x, L_x \neq R_x$. Then we choose a rational number $q_x$ s.t. $L_x < q_x < R_x$. Clearly if $x< y$ it follows that $q_x < q_y$. Hence, there is an injection from $N$ to $\mathbb{Q}$. Hence, $N$ is countable and has Lebesgue-measure $0 \implies f\in L^1$.
The point I don't understand is, why is it enough to have an injection from $N$ to $\mathbb{Q}$? We do need a surjective function as well, right?