A convex function is differentiable at all but countably many points

The set of points of nondifferentiability can be dense.

But you correctly conjectured that it is at most countable. First, convexity implies that for $s<u\le v<t$ we have $$ \frac{f(u)-f(s)}{u-s}\leq\frac{f(t)-f(v)}{t-v} \tag{1}$$ Sketch of the proof of (1). First, use the 3-point convexity definition to show this for $u=v$. When $u<v$, proceed as $$ \frac{f(u)-f(s)}{u-s}\leq\frac{f(t)-f(u)}{t-u}\leq\frac{f(t)-f(v)}{t-v}\qquad \Box$$

From (1) it follows that $f$ has one-sided derivatives ${f}_-'$ and $f_+'$ at every point, and they satisfy $$ {f}_-'(x)\le f_+'(x)\le {f}_-'(y)\le f_+'(y), \quad x<y \tag{2} $$

For every point where ${f}_-'(x)< f_+'(x)$, pick a rational number $q$ such that ${f}_-'(x)< q< f_+'(x)$. Inequality (2) implies all these rationals are distinct. Therefore, the set of points of nondifferentiability is at most countable.


I'm going to post an alternative answer for those who wish to avoid the Axiom of Choice (although that argument is much simpler than the one below).

It's fairly trivial to demonstrate that whenever $f$ is a convex map (on an open set), then $f$ is both left-differentiable and right-differentiable at every point of its domain. It's also quite typically easy to show that both $f_l'$ and $f_r'$ are both increasing functions. Furthermore, it's also typically easy to show that $f_l'(x)\leq f_r'(x)$ for every $x$ in the domain. However, another property that holds (which is much less frequently invoked however quite important here) is that whenever $x< y$, then $f_r'(x)\leq f_l'(y)$. Each of these can be readily proved from the Three Chord lemma.

The idea behind this proof is to use the fact that increasing functions have at most countably many points of discontinuity (which both $f_l'$ and $f_r'$ are). And to use this fact that we are about to prove: if either $f_l'$ or $f_r'$ are continuous at some fixed point, then both of these functions are going to agree at that point.

From the inequalities above, we can conclude for any $x$ that $$\lim_{y\rightarrow x^-}f_r'(y)\leq f_l'(x)\leq f_r'(x) \quad\text{and}\quad f_l'(x)\leq f_r'(x)\leq\lim_{y\rightarrow x^+}f_l'(y).$$

The assertion of equality in the presence of continuity is quickly deduced from these inequalities.

Now let $D$ be the set of points where $f$ is not differentiable. By the lemma we just proved, this set is contained in the set of points where either $f_l'$ or $f_r'$ is discontinuous, which is of course countable.