If X is a variety over the complex numbers, one reasonable thing to do is to consider the associated analytic space $X_{an}$ and to take the topological Euler characteristic of that. Is there a purely algebraic way to obtain this number? If X is non-singular then one might define it as the integral of the top Chern class of its tangent bundle. The reason I ask is that I'm currently reading Joyce's <a href="http://arxiv.org/abs/0910.0105">survey</a> on Donaldson-Thomas invariants and I wanted to know if by any chance he were using some more sophisticated notion. On related note: if X is a non-proper scheme over C, why is its Euler characteristic well-defined?