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 specializationspecializations. 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 functionfunctions 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 computecomputes 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 the stringy Euler characteristic 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 theorytreatment is discussed in Fulton's book Intersection Theory (specially section s 4.2.6, 4.2.9 and 19.1.7). For applicationapplications to motivic integration and stringy invariantinvariants see for example this review or this one.