Could you please explain the following statement:
Let $X,Y$ be manifolds, and assume that $\bar{X}$ is compact, and let $\phi:\bar{X} \rightarrow Y$. Suppose $y_0 \in Y-\phi(\partial X)$ is a regular value of $\phi$. Then from the inverse function theorem and compactness, $\phi^{-1}(y_0)$ is finite.
Why is it finite? I don't get it from the theorem, which talks about local diffeomorphisms?