# A question about the number of points of the preimage of a regular value. [duplicate]

I would like to have some explanation about a fact which is written in the first chapter of Milnor's book "topology, from the differentiable viewpoint". The fact is the following: Suppose $M,N$ be two differentiable manifolds of the same dimension. Let $f: M \rightarrow N$ be a differentiable map with $M$ compact and let $y \in N$ be a regular value. We define #$f^{-1}(y)$ to be the number of points in $f^{-1}(y)$, thus $f^{-1}(y)$ does not contain any critical point. And now the part which I do not understand: the book says that an observation that can be made about #$f^{-1}(y)$ is that is locally constant as a function of $y$ (where $y$ ranges only through regular values). I don't understand how to figure out this fact, I tough considering #$f^{-1}: f^{-1}(y) \rightarrow \mathbb{N}$, but still remains unclear to me why it should be a locally constant function. Could someone please can explain to me this fact maybe also (if I am not asking too much) giving a simple example.