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)?



Riemann-Hurwitz for real maps
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$.


