If you are still interested, I have a partial proof for this:
Let $A$ be the set of the local maximums of $f$ and $B$ be the set of its local minimums.
First case: $f(0) \neq f(1)$:
Given that $]f(0);f(1)[$ is uncountable, and $f(A\cup B)$ is countable (see here if you're not convinced:link), I can find $a \in ]f(0);f(1)[$ verifying $a \notin f(A\cup B)$. Given the definition of $a$, every time $f-a$ hits $0$, its sign changes. However, $(f-a)(0)$ and $(f-a)(1)$ are of opposite signs, hence $f-a$ hits $0$ an odd number of times, so $f$ takes the value $a$ an odd number of times.
Tricky case: $f(0)=f(1)=0$:
We can assume that $f(0+)$ and $f(1-)$ are of the same sign, since otherwise we can use the same argument as the first part. So from now we'll consider the case where they are both positive.
Sub-case 1: $A$ and $B$ are finite: Then, since we know that $f$ is increasing around $0$ and decreasing around $1$, $|A\cup B|$ is odd, so we can choose a value $a$ verifying $|\{x \in A\cup B|f(x)=a\}|$ is odd. Given that definition, $f$ takes the value $a$ an odd number of times.
Sub-case 2: $A$ and $B$ are infinite.
I don't know how to handle this sub-case. (I think one has to use the Bolzano-Weierstrass theorem on A and B, and somehow use the continuity of $f$, but I can't quite make this work.)