We can associate to any $\mathbb{C}$-scheme in a canonical way a constructible function $\nu_{X}:X\rightarrow \mathbb{Z}$, which takes care of the singularities of the space $X$. This is proved in this paper <a href="http://annals.math.princeton.edu/2009/170-3/p06">Donaldson-Thomas type invariants via microlocal geometry</a>. We can then define the weighted Euler characteristic of $X$ as
$$
\chi(X,\nu_{X})=\sum_{n\in\mathbb{Z}}n\chi(\nu_{X}^{-1}(n)),
$$
where $\chi$ is the topological Euler characteristic. This is actually a finite sum and well-defined. The constructible function $\nu_{X}$ is quite mysterious and I don't think much is known about it. We know for example that $\nu_{X}(p)=(-1)^{\dim_{p}X}$ when $p\in X$ is a smooth point. So, when $X$ is smooth, we have
$$
\chi(X,\nu_{X})=(-1)^{\dim X}\chi(X).
$$
Another good situation is probably when $X$ can be written as the critical locus of some function. In this case we can use topological techniques (such as Milnor number) to compute the function $\nu_{X}$.