Let $X$ be a compact metric space. Does there always exist a continuous $f : X \to \mathbb{R}$ such that $\{ x \in X : f(x) = \| f \|_{\infty} \}$ is at most countable?
Certainly this is true for $[0,1]^n$, take $f(x_1,\ldots,x_n) = x_1 + \cdots + x_n$. It seems it should hold in general but I'm not sure how to attempt to prove that.