How do you define the Euler Characteristic of a scheme? 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 survey 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?
 A: One comment on the "excision" property for Euler characteristics of complex algebraic varieties: $\chi(X) = \chi(Z) + \chi(X\backslash Z)$.  There is a short proof of this in Fulton's Introduction to Toric Varieties, p. 142, which avoids the sticky triangulation issue and doesn't seem to be so well-known.  In fact, it's equivalent to the statement that $\chi(X) = \chi_c(X)$ for any algebraic variety (the latter being the Euler characteristic for compactly supported cohomology). 
This doesn't exactly help with the first question (about an algebraic definition), but it does show why the Euler characteristic is well-defined for any variety, per Arend's comment.
A: Here are some comments on the questions of the posting.
Every complex algebraic variety has the homotopy type of a finite CW-complex, so the Betti numbers are finite and the Euler characteristic is well defined. To simplify consider the quasi-projective case. Let $X\subset \mathbf{P}^n(\mathbf{C})$ be a projective variety and let $Y$ be a closed subvariety, then we can consider both $X$ and $Y$ as real algebraic varieties in $\mathbf{P}^{2n}(\mathbf{R})$. Now real projective spaces can be embedded in affine spaces, as opposed to the complex case: we can associate to a line $l$ in $\mathbf{R}^{k+1}$ the unique orthogonal projection with image $l$. A similar trick exists over an arbitrary field (the Jouanolou trick), but it is the uniqueness of the projection that gives us an embedding in the real case. In coordinates we take a point $(x_0:\cdots: x_k)$ to the $k+1$ by $k+1$ matrix $(\frac{x_i x_j}{\sum x_i^2})$.
This implies that real projective varieties are affine. Then one can use the triangulation theorem for real affine varieties, as presented e.g. in Hironaka's Arcata 1974 lectures to triangulate $X$ so that $Y$ is a subcomplex; this gives a triangulation of $X\setminus Y$ (infinite if $Y$ is nonempty) and a finite CW complex homotopy equivalent to $X\setminus Y$.
I'm pretty sure a similar result should hold for arbitrary (not necessarily projective) complex algebraic varieties and also for algebraic spaces, but I've never seen the details worked out in the literature.
The other question (whether or not the algebraic structure determines the cohomology) is not completely trivial either (and the answer depends on what exactly one means by cohomology). If $X$ is defined over a finite extension $F$ of $\mathbf{Q}$ and $X'=X\times_F\mathbf{C}$ for some embedding $F\subset\mathbf{C}$, then the cohomology ring of $X'(\mathbf{C})$ with finite coefficients does not depend on the embedding (and hence neither does the complex cohomology ring), see Freitag-Kiehl, \'Etale cohomology, theprem 11.6. It was an old question of Grothendieck whether the rational cohomology ring can depend on the embedding. It turned out even the real cohomology ring can, as recently shown by F. Charles. See www.math.ens.fr/~charles/crll5855.pdf
upd: here is an explicit procedure to obtain the Euler characteristic from the algebraic data: as mentioned in the comments, if $X$ is smooth and complete, we can take the alternating sum of the Euler characteristics of $\underline{\Omega^i}_X$'s. If $X$ the complement of a simple normal crossing divisor $D_1\cup\cdots \cup D_k$ in a smooth complete $D_{\varnothing}$, then $$\chi(X)=\sum_{I\subset\{1,\ldots,k\}}(-1)^{|I|}\chi(\cap_{i\in I} D_i).$$ Here we use the fact that the differentials in a spectral sequence do not change the Euler characteristic. In general one stratifies $X$ so that the difference of any two consecutive strata is smooth and takes the sum of the Euler characteristics of the strata. Using a similar procedure one can compute the Serre characteristic, which is a 2 variable analog; it can be seen as the image of the compactly supported cohomology in the Grothendieck group not of $\mathbf{Q}$-vector spaces, but of the mixed Hodge structures.
A: If $X$ is a smooth variety over the complex numbers, you can use the topological  Euler characteristic of the support $X(\mathbb{C})$ of the scheme. The most efficient way to compute it is to use Chern classes and the Poincaré-Hopf theorem: the Euler characteristic is the degree of the top Chern class. Chern classes can be defined purely algebraically (in homology) as it is done for example in Chapter 3 of Fulton's book "Intersection Theory". 
When $X$ is singular, there are many nonequivalent generalizations of the Euler characteristic. One efficient approach is again to work in the spirit of the   Poincaré-Hopf theorem by first defining Chern classes for singular varieties. This provides a purely algebraic treatment. I will give a tour of the  4 most famous examples:
-The Chern-MacPherson class (also known as the Chern-Schwartz-MacPherson class ) is probably the most important. It can be defined on the Chow group   of a variety using constructible functions. It enjoys   beautiful functorial properties under proper maps and  it is compatible with specializations. The existence of the Chern-MacPherson class  realizes a conjecture of  Deligne and  Grothendieck of 1969 as the unique natural transformation between the covariant functor of constructible functions and the usual covariant functor of $\mathbb{Z}$-homology such that it maps  the characteristic function of a manifold to its (homological)  Chern class. The Chern-MacPherson class computes the topological Euler characteristic of a (possibly singular) variety.
-The Chern-Mather-class enters the definition of the Chern-MacPherson class. It is relevant to compute  stringy invariants. It has nice properties under proper birational maps and can be simply defined using a Nash-blow-up. 
These two classes (MacPherson and Mather) can be generalized to scheme by considering the support of the scheme. This makes calculations much more easy, but obviously one looses a lot of the information carried by the scheme. The next two definitions are much more "scheme friendly" but they have less understood functorial properties.
-The Chern-Fulton and the Chern-Fulton-Johnson classes are both extremely sensitive to the scheme structure. They coincide in the case of local proper intersections. In general they don't satisfy  the "inclusion-exclusion principle" which is satisfies by the topological Euler characteristic.
References
For  a friendly  introduction with references to the appropriate literature, I would recommend  this short  lecture notes by Paolo Aluffi. 
The general treatment  is discussed in Fulton's book  Intersection  Theory (specially  section s 4.2.6, 4.2.9 and 19.1.7). For applications to motivic integration and stringy invariants see  for example 
 this review  or  this one.
