TITLE: A function that crosses each horizontal line only finitely many times
QUESTION [8 upvotes]: Consider a real function $f(x)$ (not necessarily continuous) defined on a finite interval. Given a constant $C$, divide the interval to sub-intervals such that, in every sub-interval, either $f(x)<C$ or $f(x)>C$ (where the points $f(x)=C$ are ignored). Let $N(f,C)$ be the smallest number of sub-intervals in such a division.
Informally, $N(f,C)$ is approximately the number of times that the function $y=f(x)$ "crosses" the horiznotal line $y=C$, where "crosses" means that it goes from being below the line to being above the line or vice versa.
For example:

If $f(x)=\sin(x)$ defined on the interval $[-\pi,\pi]$, then $N(f,0)=2$, since $f(x)$ is negative on $(\pi,0)$ and positive on $(0,\pi)$. 
If $f(x)=x\cdot \sin(1/x)$ on the same interval then then $N(f,0)=\infty$, since this function crosses the line y=0 infinitely many times.

What term describes the functions for which $N(f,C)$ is finite for every $C$ and on any interval?

REPLY [3 votes]: Sorry, can't comment: Look up the Banach Indicatrix of a function and functions of bounded variation.
The Banach indicatrix of a function $f\colon D \to \mathbb{R}$ is defined by $N(f,y) = \#\{x \in D \mid f(x) = y\}$ which is very similar to (but not exactly the same as) your definition.