Let $X$ be a projective variety over $\mathbb{C}$. Is there a way to define some number $\tilde{\chi}(X)\in \mathbb{Z}$ satisfying both of the following two properties?
$\boldsymbol{(1)} \;$ When $X$ is smooth, $\tilde{\chi}(X)=\chi(X)$, where $\chi(X)$ is the usual Euler number of $X$ (as a topological space).
$\boldsymbol{(2)} \;$ $\tilde{\chi}(X)$ is invariant under deformation, i.e. if we have a family of variety over a connected base $B$, then any two fibers have the same $\tilde{\chi}$.
If I consider an affine variety (still over $\mathbb{C}$) instead of a projective variety, then what is the answer to the corresponding question?
(2) This definition of course is not preserved by arbitrary deformatons: take a family of elliptic curves (any of them is diffeomorphic to $S^1 \times S^1$) that degenerates to a cuspidal curve (which is diffeomorphic to $S^2$).
– Francesco Polizzi Sep 19 '16 at 05:55