We know that
the set of discontinuities($E$ say) of a monotonic function $f$ is at most countable.
In its proof as given in Rudin(2ed), for every $x\in E$ we associate a rational number $r(x)$ such that $$f(x-)<r(x)<f(x+)$$ Since $f$ is monotonic both $f(x-),f(x+)$ exists and hence we can find such a rational number $r(x)$. Thus we have a $1-1$ correspondence between the set E and a subset of the set of rational numbers. Hence it is atmost countable.
Doubt: suppose $f(x-),f(x+)$ does not exist, and let $f(x-)=-\infty$ and $f(x+)=+\infty$ then here also we can find such a $r(x)$ and put $E$ in $1-1$ correspondence with a subset of rational numbers.
I couldn't find any contradiction, that when $f$ is not monotonic the above argument cannot be applied.
We are dealing with an increasing function here. We cannot have $f(x-)=-\infty$ since $f(x-)\ge f(y)$ for any $y<x$.
For non-monotonic functions there are two obstructions to this argument. A discontinuity may not be simple: either or both of $f(x-)$ and $f(x+)$ may fail to exist. Also, even if they did the proof that the $r(x)$ are distinct collapses.