Proof (degree mod 2)

By the homogeneity lemma, there exists a diffeomorphism $h: Y\to Y$ sending $y \mapsto y'$ which is smoothly isotopic to $\id_Y$. Note $y' = h(y)$ is a regular value of $h\circ f$ (because $h$ is a diffeomorphism), and $f$ and $h \circ f$ are smoothly homotopic.

By the homotopy lemma, $$ \begin{align*} \# f\inv(y') \equiv \# (h\circ f)\inv(y') = \# f\inv(y) \pmod 2. \end{align*} $$