Here's a direct connection between the index of a vector field and the obstruction theory definition of the Euler class. Note, I'm using the definition of the obstruction class from Wikipedia, since you link to it in the question.
Let $M$ be an $(n+1)$-manifold, because the indexing is slightly easier.
Let $V$ be a vector field on $M$ with finitely many zeroes. Triangulate $M$ such that each zero is in the interior of a different $(n+1)$-simplex, oriented so that it agrees with the orientation on $M$.
Then $V|_{M^{[n]}}$ (meaning the restriction of $V$ to the $n$-skeleton of $M$) is nonvanishing, and thus defines a partial section of $T^1M$ on the $n$-skeleton. The obstruction cochain will be an $n$-cochain with values in $\pi_n(S^n)\cong \Bbb{Z}$ (note that the orientation determines the isomorphism of $\pi_n$ of the fiber, $S^n$ with $\Bbb{Z}$).
The value of the $(n+1)$-cochain on a particular $(n+1)$-simplex $\Delta$ is given by $V(\partial \Delta)\in \pi_n(p^{-1}(\Delta))\cong \pi_n(S^n)\cong \Bbb{Z}$, where $p:T^1M\to M$ is the projection.
Now it's worth going over the details of this computation here.
If $\Delta$ doesn't contain a $0$ of $V$,
then $V(\Delta)$ fills in $V(\partial \Delta)$, so $V(\partial\Delta)$ is $0$ in $\pi_n(p^{-1}(\Delta))$, and thus the final integer value is $0$.
On the other hand, if $\Delta$ does contain a $0$ of $V$, $x$, then
by definition, the index of $V$ at $x$ is the degree of a map from $S^n\to S^n$ where the first $S^n$ is the boundary sphere of a disk $D^{n+1}$ in $M$ on which $T^1M$ is trivializable, and $V$'s only zero is $x$, and the second $S^n$ is the standard sphere in $\Bbb{R}^n$. The map is the composite
$$ \partial D^{n+1} \xrightarrow{V} \partial D^{n+1}\times (\Bbb{R}^{n+1}\setminus\{0\}) \to S^n,$$
where the second map is the projection onto $\Bbb{R}^{n+1}\setminus\{ 0\}$ followed by normalization. Note that the first map depends on a choice of trivialization, which should be chosen to be compatible with the orientation.
For convenience, note that we can dispense with requiring $T^1M$ to be trivializable, since the degree is a homotopy invariant, so it suffices that $T^1M$ is trivializable up to homotopy, which is in fact the case for any choice $D^{n+1}$. In particular, it is true for $D^{n+1}=\Delta$. Additionally, the degree of the map is usually computed with either homology (or cohomology), but in our case, the degree can also be computed with homotopy groups, since for the sphere we have canonical isomorphisms $H_n(S^n)\cong \pi_n(S^n)$ by the Hurewicz theorem.
However, if we use this to translate things over, we see that the value of the obstruction cochain on $\Delta$ is the index of the vector field $V$ at $x$.
Now we're almost done.
The isomorphism of $H^{n+1}(M)$ with $\Bbb{Z}$ for a closed, connected, oriented manifold $M$ is given by evaluating an $(n+1)$-cochain at the fundamental class.
If we call the obstruction $(n+1)$-cochain $\delta$, then
the integer we want is
$$
\sum_{\Delta} \delta(\Delta) = \sum_{x} \operatorname{index}_x V.
$$
Here is a result that is probably closer to what you are asking, instead of the links in the comments (which are mostly only geodesics and thus the previous chapter in Lee's book):
Recall the sectional curvature $K$ is only defined on non-degenerate tangent $2$-planes in pseudo-Riemannian case, as we need to divide by $g(v,v)g(w,w)-g(v,w)^2$. This means the domain of $K_p$ is a noncompact open subset of $\operatorname{Gr}_2(T_pM)$, and hence as a result we can't expect it to be bounded in general (unlike Riemannian case $\operatorname{dom}K_p=\operatorname{Gr}_2(T_pM)$ is compact). In fact:
Theorem (Kulkani 1979, Nomizu 1983): Let $M$ be a pseudo-Riemannian manifold of dimension $\geq 3$ and index $>0$ (i.e., $g$ is indefinite). Then at each point $p\in M$, TFAE:
- $K_p$ is constant
- $K_p$ is bounded below
- $K_p$ is bounded above
- $K_p$ is bounded on indefinite planes
- $K_p$ is bounded on definite planes
Corollary: The sectional curvature of such $M$ is unbounded from above or below, unless the manifold has constant sectional curvature.
So a lot of naive analogue of comparison theorems involving sectional curvature become completely trivial in pseudo-Riemannian case (e.g., $\frac14$-pinching theorem). In particular, relating back to the question of submanifolds: there are results (collectively called Chen's inequalities) for Riemannian case bounding intrinsic and extrinsic curvature invariants that allow you to say something more for, e.g., minimal submanifolds, but the same is much harder, if not downright impossible, in pseudo-Riemannian case.
Best Answer
Calculate the homological intersection number of L with a pushoff. If the pushoff is using a section of the normal bundle (which is isomorphic to the tangent bundle) then you get minus the Euler characteristic because that's the homological intersection of a section of the tangent bundle with the zero section. However, you can also pushoff using a translation in $\mathbb{C}^n$, which displaces L from itself if you translate far enough because L is compact and hence bounded. This gives intersection number zero. Now notice that if L is orientable then homological intersection number can be computed using any pushoff by standard results in differential topology (it's just $[L]^2$). If it's not orientable then this still works mod 2. In fact, as observed by Audin, using the Pontryagin square instead of $[L]^2$, you get the result modulo 4 in the non-orientable setting. In fact, you don't need the Weinstein neighbourhood theorem, only the fact that normal and tangent bundles are isomorphic (which is strictly easier: it just uses linear algebra rather than Moser's argument).
The same strategy tells you the Euler characteristic equals $[L]^2$ in general (not just in $\mathbb{C}^n$).