I understand the proof that shows that if $f$ is monotone on an interval, then it has at most countably many jump discontinuities. I feel like a similar idea also allows us to show that any function can have at most countably many jump discontinuities. Here is my attempt at a proof.
If a jump continuity of $f$ exists at $x$, this means that $f(x^-)$ and $f(x^+)$ exist, but $f(x^-)\neq f(x^+)$. The existence of left and right hand limits means that for any $\epsilon > 0$, we can find a $\delta > 0$ such that if $y\in (x,x+\delta)$, then $|f(x^+) - f(y)| < \epsilon $ and if $y\in (x-\delta, x)$, then $|f(x^-)-f(y)| < \epsilon$. Thus, the only discontinuity (jump or otherwise) in the interval $(x-\delta, x+\delta)$ is at $x$.
I believe that this means that the jump discontinuities only exist within disjoint open intervals, of which there are at most countably many. If there does appear to be an issue at the boundary of the interval, for example, in a case where $x<y$ are both jump discontinuities and $x+\delta_x = y-\delta_y$, then we can make $\delta_x$ or $\delta_y$ a bit smaller to prevent this overlap.
Is this proof correct, or am I missing something? This statement seems a bit strong, especially since I've only heard a similar statement for monotone functions on an interval. If it's not true, can someone give a counterexample?