Resumen: We present a method to compute the Euler characteristic of an algebraic subset of C^n. This method relies on classical tools such as Gröbner basis and primary decomposition. The existence of this method allows us to define a new invariant for such varieties. This invariant is related to the problem of counting rational points over finite fields. In an appendix, Jørgen Vold Rennemo proves the relation between this invariant and the Chern-Schwartz-MacPherson class of the variety. Idioma: Inglés DOI: 10.5427/jsing.2012.4g Año: 2012 Publicado en: Journal of singularities 4 (2012), 114-130 ISSN: 1949-2006 Tipo y forma: Artículo (Versión definitiva)