Let $e(-)$ denote ordinary Euler characteristic and $\chi_c(-)$ the compactly supported version.

Complex varieties admit Whitney stratifications. In particular, each closed stratum in such a stratification is a strong deformation retract of a tubular neighborhood. It follows (Mayer-Vietoris) that if $Y\subseteq X$ is such a closed strata, then $e(X) = e(Y) + e(X-Y)$.

<b>Added later</b>: Let me try and elucidate the above claim a bit more. For intuition let me make an informal remark: one of the reasons Whitney stratifications are so nice is that if one thinks of strata as spaces glued (or perhaps "linked" is a better word here) together, then in a Whitney stratification the gluing happens using locally trivial fibre bundles (I think Thom's original definition of .

Now back to the claim above. Let $T$ be the tubular neighborhood of $Y$. This is a fibre bundle over $Y$, with fibre homeomeorphic to the mapping cone $cone(L)$ of a compact space $L$ (the link). Removing $Y$ from this neighborhood amounts to removing the vertex of $cone(L)$ (the "zero section"). So one is reduced to showing that the Euler characteristic of $L$ is $0$. Now the Whitney stratification of $X$ yields a Whitney stratification of $L$ by odd (real) dimensional oriented manifolds. By induction one sees that such a space must have zero Euler characteristic (I think this is originally an observation of Sullivan; the intuition is the same: at each step of your stratification you are attaching a compact space with the above properties to an oriented odd dimensional manifold using locally trivial maps whose fibre satisfies the same properties). 

Now, if $X = \bigsqcup_i X_i$ is a Whitney stratification with each $X_i$ smooth, then by Poincare duality, $e(X_i) = \chi_c(X_i)$ for each $i$. Let $Y$ be a stratum of minimal dimension. So $Y$ is closed. By induction on the number of strata we may assume $e(X-Y) = \chi_c(X-Y)$. Now use the observation of the previous paragraph and you are done.