TITLE: Riemann-Hurwitz for real maps
QUESTION [6 upvotes]: Let $S$ be a (compact, connected) Riemann surface of genus $g$ and $f: S\to \mathbb CP^1$ be a degree $d$ meromorphic function. Then the Riemann-Hurwitz formula tells us that the number of ramifications of $f$ counted with multiplicity is $2(d-1)+2g-2$. 
Suppose we consider instead a map $\varphi: S\to \mathbb CP^1$ of degree $d$ that is smooth, but not necessarily holomorphic. It will have singularities, like folds, etc. 
Question. Can one express the number $2(d-1)+2g-2$ as a sum of contributions, involving various types of singularities of the map $\varphi$ (say, if $\varphi$ is analytic)?

REPLY [4 votes]: This is not possible, just using the singularities and the homological degree of the map.
Let $f_1$ be a generic degree $3$ holomorphic map $\mathbb P^1 \to \mathbb P^1$. It has four quadratic singularities. Let $E$ be an elliptic curve, and $f_2$ a degree $2$ map $E \to \mathbb P^1$, with four simple ramification points singularities.
Let $f_1'$ and $f_2'$ be $f_1$ and $f_2$ with the orientations of the source reversed.
Then we can glue $f_1$ to $f_1'$, and $f_2$ to $f_2'$, by cutting out a disc from each component, lying over the same disc of $\mathbb P^1$, and gluing the holes together, introducing orientation-reversing fold singularities.
These glued maps are from Riemann surfaces of genus $0$ and $2$ respectively, but have the same singularities, being four positive-orientation simple ramification points, four negative-orientation simple ramification points, and a loop of orientation-reversing folds, and the same degree, $0$.