MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).

We can associate to any $\mathbb{C}$-scheme $X$ 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 Donaldson-Thomas type invariants via microlocal geometry. We can then define the weighted Euler characteristic of $X$ as by $$\chi(X,\nu_{X})=\sum_{n\in\mathbb{Z}}n\chi(\nu_{X}^{-1}(n)),$$ where $\chi$ is the topological Euler characteristic. This The RHS is actually a finite sum and this is 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}$.
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 Donaldson-Thomas type invariants via microlocal geometry. 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}$.