A strict local maximum has a punctured neighborhood in which the values are less that that value. Every neighborhood has a rational number, so each strict local maximum is associated with a rational number. The rationals are countable, thus the strict local maxima are as well.
My previous argument is not rigorous and it does have some problems. Here is a more rigorous one.
For each strict local maximum location $a\in[0,1]$ there is a $\delta>0$ such that $0<|x-a|<\delta\implies f(x)<f(a)$. Let $\delta_a$ be the least upper bound (supremum) of such $\delta$'s for the given $a$. Then $0<\delta_a\le 1$.
If $a\ne b$ are both strict maxima, then $|a-b|$, the distance between $a$ and $b$, may be less than $\delta_a$ if $f(b)<f(a)$, but then $|a-b|$ must be at least $\delta_b$. So $|a-b|\ge\min(\delta_a,\delta_b)$. The $\delta$'s are a measure of "spread" of the strict local maxima.
So for any given $n\in\Bbb Z^+$, the number of $a$ such that $\delta_a\ge\frac 1n$ is at most $n+1$.
We can now count the strict local maxima: first list all $a$ such that $\delta_a\ge \frac 11$, then those such that $\delta_a\ge\frac 12$, and so on. Each stage gives us finitely many strict local maxima, there are countably many stages, and the union gives us all strict local maxima. Therefore there are at most countably many strict local maxima.
No, the function $f(x)=\max(\min(2\sin(x),1),-1)$ is a continuous function in $\mathbb{R}$ which has no strict local maximum and no strict local minimum but it is not monotone or constant. Here $x_0$ is a strict local maximum (minimum) for $f$ if there is $r>0$ such that $f(x_0)>f(x)$ ($f(x_0)<f(x)$) for all $x\in (x_0-r,x_0)\cup (x_0,x_0+r)$.
Hint for the second question. Let $f$ be a continuous function in $\mathbb{R}$ which has no local maximum and no local minimum. Assume that there are $x<y$ such that $f(x)=f(y)$. Since $f$ is continuous in $[x,y]$ it has a maximum point $t$ and a minimum point $s$ in $[x,y]$. By hypothesis $t,s\not \in (x,y)$. So $t=x$ and $s=y$ or $s=x$ and $t=y$ which implies that $f$ is constant in $[x,y]$. Contradiction!
Hence $f$ is injective in $\mathbb{R}$.
Best Answer
For each $\delta>0$, the set of all $x\in\mathbb{R}$ such that $f(y)<f(x)$ for all $y$ with $0<|x-y|<\delta$ is countable. This can be seen by noting that the set contains at most one element of the interval $[k\frac{\delta}{2},(k+1)\frac{\delta}{2}]$ for each integer $k$, and these intervals cover $\mathbb{R}$. The set of strict local maxima is a countable union of such sets, for example taking $\delta=\frac{1}{n}$ as $n$ ranges over the positive integers.
Suppose that $f$ is a continuous function that is not monotone on any interval. We want to show that $f$ has a local maximum in every interval. The argument is the same if the interval is $(0,2)$, so to slightly reduce notation let's work there. Note that not being monotone in any interval means that each interval contains pairs $x_1<x_2$ and $y_1<y_2$ such that $f(x_1)<f(x_2)$ and $f(y_1)>f(y_2)$. So $(0,1)$ contains a pair $x_1<x_2$ such that $f(x_1)<f(x_2)$, and $(1,2)$ contains a pair $y_1<y_2$ such that $f(y_1)>f(y_2)$. Because $f$ is continuous, there is a point $x_0\in [x_1,y_2]$ where $f$ has its maximum value. Because $f(x_2)>f(x_1)$ and $f(y_1)>f(y_2)$, $x_0$ is not an endpoint of $[x_1,y_2]$. Therefore $f$ has a local maximum at $x_0$.