An exercise from "Mathematical Analysis" of T. M. Apostol.
Let $f$ be an increasing function defined on $[a, b]$ and let $x_1, ... , x_n$ be $n$ points in the interior such that $a < x_1 < x_2 < ... < x_n < b$.
a) Show that $\sum_{k=1}^n [f(x_k+) - f(x_k-)] \leq f(b-) - f(a+)$.
b) Deduce from part (a) that the set of discontinuities of $f$ is countable.
c) Prove that $f$ has points of continuity in every open subinterval of $[a, b]$.
Here $f(x-)$ and $f(x+)$ mean the left-hand and right-hand limit of $f$ in $x$.
Solution for (a)
For (a), by $f$ increasing, we have $f(b') - f(x_n) + \sum_{k=1}^{n-1} [f(x_{k+1}) - f(x_k)] = f(b') - f(x_1) \leq f(b') - f(a')$ for every $a' \in (a,x_1)$ and $b' \in (x_n, b)$. Hence taking the supremum of $f(b')$ for $b' \in (x_n, b)$ and the infimum of $f(a')$ for $a' \in (a,x_1)$, calling $b'=x_{n+1}$, we have:
$\sum_{k=1}^{n} [f(x_{k+1}) - f(x_k)] \leq f(b-) - f(a+)$
Notice that $f(b-)$ must exist and can't be infinity because $f(b') \leq f(b-) \leq f(b)$, the same for $f(a+)$.
For $f$ is increasing, $f(x_{k+1}) \geq f(x_k+)$ and $f(x_{k}) \geq f(x_k-)$ hence $f(x_k+) - f(x_k-) \leq f(x_{k+1}) - f(x_{k})$, and we have:
$\sum_{k=1}^{n} [f(x_k+) - f(x_k-)] \leq f(b-) - f(a+)$
Solution for (c)
From (b) is trivial, if $f$ is disconitnuous everywhere in an open subinterval of $[a, b]$ the $f$ has uncountable many points of discontinuity.
I'm asking for a solution for (b).