Suppose $X$ and $Y$ are topological spaces and $f : X \to Y$ is a continuous, surjective map. Let $Y$ be connected.
Pick $y \in Y$ and suppose that $p^{-1}(y)$ is a finite set, with $|p^{-1}(y)| = n$. Let $V$ be a neighbourhood of $y$, is there a theorem that states that for any $y' \in V$, with $y' \neq y$ it follows that $|p^{-1}(y')| = n$?
Essentially what this is saying that the cardinality of the preimage is a locally constant function, I've never seen this result before, only something similar in a slightly different case (which dealt with compactness) in Topology from the Differentiable Viewpoint by John Milnor
Is there such a theorem, that the cardinality of the preimage is a locally constant function? If so how can I prove it? Also does a stronger version of this theorem hold, with fewer hypothesis (e.g. can we remove connectedness of $Y$)?
If a theorem doesn't exist with the current hypotheses, what hypotheses are needed to be added to arrive at the desired result?