TITLE: Euler Characteristic of Real Algebraic Surfaces
QUESTION [11 upvotes]: Given a (compact if needed) real smooth surface $V(f)$ defined by  $f\in \mathbb{R}[X,Y,Z]$, in particular it is oriented. Is there a formula which gives the Euler character of $V(f)$ ?
Thanks.

REPLY [8 votes]: A “formula” is a lot to ask for, but there are algorithms based on Morse theory.
E.g. §5 of Basu (1999), or §3 of Fortuna-Gianni-Luminati (2004).