Milnor's proof that $\#f^{-1}(y)$ is locally constant as a function of $y$ Recall that for a smooth map $f : M \to N$ with $M$ compact, and a regular value $y \in N$, we define $\#f^{-1}(y)$ to be the number of points in $f^{-1}(y)$

From Milnor's book : The first observation to be made about $\#f^{-1}(y)$ is that it is locally constant as a function of $y$. I.e. there is a neighbourhood $V \subseteq N$ of $y$ such that $\#f^{-1}(y') = \#f^{-1}(y)$ for any $y' \in V$ 

Milnor's proof goes as follows :
Let $x_1, ... x_k$ be the points of $f^{-1}(y)$ and choose pairwise disjoint neighbourhoods $U_1, ... U_k$ of these which are mapped diffeomorphically onto neighbourhoods $V_1, ... V_k$ in $N$. We may then take $$V = V_1 \cap V_2 \ \cap ... \cap \ V_k - f[M - U_1 - ... - U_k]$$

The fact that there are only $k$ such points $x_k$ in $f^{-1}(y)$ follows from the fact that $f^{-1}(y)$ is a finite set, and the fact that we can choose pairwise disjoint neighbourhoods follows from the fact that $M$ and $N$ are Haursdoff spaces, and it is quite trivial to see that $V$ is a neighborhood of $y$.
However I'm having some trouble understanding why those neighborhoods $U_i$  need to be mapped diffeomorphically onto $V_i$ for $ 1 \leq i \leq k$. I realize that Milnor is using the Inverse Function Theorem (as stated below taken directly from his book) here, but I fail to see why these $U_i$ are sufficiently small enough.

Inverse Function Theorem If the derivative $df_x : \mathbb{R}^k \to \mathbb{R}^k$ is nonsingular, then $f$ maps any suffiiciently small open set $U'$ about $x$ diffeomorphically onto an open set $f[U']$

Assuming the above trouble can be rectified, then that fact that $\#f^{-1}(y') = \#f^{-1}(y)$ for $y'$ and $y$ in $V$ follows from the fact that $V = V_1 \cap V_2 \ \cap ... \cap \ V_k - f\left[M - U_1 - ... - \ U_k\right]$ only contains those $y \in N$ which are mapped diffeomorphically onto $N$ by neighborhoods $U_1, U_2, ... U_k$ of $x_i \in f^{-1}(y)$ for $1 \leq i \leq k$.
Hence it follows by elementary set theory, and the inverse function theorem that $f : f^{-1}[V] \to V$ is a diffeomorphism and thus one-to-one, and hence for any $y, y' \in V$ we have $\#f^{-1}(y') = \#f^{-1}(y) = 1$
Is my understanding of the proof correct? If so, then how can I show that those $U_i$ are sufficiently small enough?
 A: Each $U_i$ is chosen small enough to make $f$ a diffeomorphism near the preimage $x_i$. This can be done by directly applying the implicit function theorem. Now the problem is that the image of the neighbourhood of $x_i$ is too big when pulled back to a neighbourhood of some other $x_k$ (the set on which $f$ is a local diffeomorphism near $x_i$ may be too small). 
The proof you cited already addresses this point by first looking at each of the $x_i$, searching the neighbourhood pertinent to that point and then taking the intersection of those open sets on which $f$ is a local diffeomorphism. If $f$ is a local differomorphism on $V_k$, then it is in particular a local diffeomorphism on any open $V\subset V_k$ (for each $k$). 
(Here you are using the fact that the number of preimages is finite, which allows you to conclude that the (finite) intersection of open preimages is still open).
Once you have neighbourhoods such that $f$ is a local diffeomorphism on each of them each point in the image is hit exactly once on each of these neighboourhoods, because $f$ is a bijection there.
A: Suppose you find "pairwise disjoint neighborhoods $W_1, \ldots, W_k$" of these that are mapped diffeomorphically onto neighborhoods $V_1, \ldots, V_k$ in $N$". 
Then you can, within each $W_i$, find a "small enough" set $U_i$ with the corresponding property, and which satisfies the hypotheses of the Inverse Functiuon Theorem. 
