Definition (intersection number mod 2)
Let $f: X\to Y$ be a smooth map between manifolds, and $Z\subseteq Y$ be a submanifold.
Assuming $X$ is compact, $f\pitchfork Z$ and $\dim X + \dim Y = \dim Z$ (so the preimage theorem implies $f\inv(Y)\subset X$ is 0-dimensional so finite), define the intersection number mod 2 $$ \begin{align*} I_2(f,Z) := \# f\inv(Z)\pmod 2. \end{align*} $$
In particular if $X\subset Y$ (taking $f$ to be inclusion), $$ \begin{align*} I_2(X,Z) := \#(X \cap Z) \pmod 2. \end{align*} $$
Fact: if $f$ and $g$ are smoothly homotopic and $f,g\pitchfork Z$, then $I_2(f,Z) = I_2(g,Z)$.
If $f$ is not transversal to $Z$, perturb $f$ via a smooth homotopy.