I was wondering whether anyone would be so kind as to briefly check my proof? I am supposed to prove the statement without using any theorems which would render the proof trivial.
If $\displaystyle\int_a^b f$ exists then $f$ has infinitely many points of continuity in $[a,b]$
For the sake of contradiction suppose $f$ has finitely many. It suffices to show that there is an interval $[u,v]\subset [a,b]$ over which $f$ is not Riemann integrable. Pick any $[u,b]\subset [a,b]$ such that $f$ is discontinuous everywhere in $[u,v]$. For any finite partition $D=\{x_1\cdots x_n\}$ of $[u,v]$ let:
$$s(f,D)=\sum_i (x_{i+1}-x_i)\inf_{x\in[x_{i},x_{i+1}]}f\quad\text{and}\quad S(f,D)=\sum_i (x_{i+1}-x_i)\sup_{x\in[x_{i},x_{i+1}]}f$$ We prove $\sup_D s(f,D) <\inf_D S(f,D)\;(1)$. To achieve this consider an arbitrary chain: $$D_0\subset D_1\subset \cdots$$ Pick any $I_0\subset I_1\subset \cdots$ where $I_k=[u_k,v_k]$ and $I_k$ is an interval of the partition $D_k$. Without loss of generality $\bigcap_i I_i=z$. Given that $f$ is discontinuous everywhere, there exists $\epsilon>0$ such that for any $\delta>0$ there exists $y$ such that $|z-y|<\delta$ yet $|f(z)-f(y)|\geq \epsilon$.
This immediately implies $\displaystyle\sup_{I_n} f>\inf_{I_n} f$ and hence $\displaystyle\sup_{D_n} s(f,D)<\inf_{D_n} S(f,D)$.
This is valid for any sequence $D_n$ so claim $(1)$ holds, contradicting the integrability of $f$.