Let $V \rightarrow M$ be an oriented rank $k$ vector bundle over a compact orientd manifold $M$. Let $X \subset M$ be a compact topological subspace of $M$ that is a smooth oriented submanifold of dimension $k$, except possibly at a a set of points that have ``dimension'' less than or equal to $k-2$. More precisely, the set of singular points is contained inside a submanifold of dimension $k-2$ or less.
Let $s :X \rightarrow V$ be the restriction of a smooth section from $M$ to $V$. Assume that when restricted to $X$, the section vanishes only on the smooth points of $X$, and it vanishes transversally. Is it true that the number of zeros of $s$ inside $X$, counted with a sign is the Euler class of $V$ evaluated on the fundamental class of $X$ , ie $$ +-|s^{-1}(0)| = \int_{[X]} e(V) $$
We need $X$ to have singularities of dimension $k-2$ or less, to ensure that it defines a homology class $[X]$ (ie to make sure that the integration actually makes sense). Note that $[X]$ is an element of $H_k(M, \mathbb{Z})$ and $e(V) \in H^k(M, \mathbb{Z})$. So the expression makes perfect sense, even though $X$ is a singular space.
I believe this statement is true, but is there a reference for this fact?