The sum of the residues of a meromorphic differential form on a compact Riemann surface is zero How can one see that the sum of the residues of a meromorphic function on a Riemann surface $
\Sigma_g$ of positive genus is always zero? This is not true for the Riemann sphere $\mathbb{CP}^1$.  
 A: I'm assuming that you meant residues of meromorphic differential forms; Mariano explained in a comment why talking about residues of a function on a Riemann surface is a bad idea.
Take for example $\omega=\mathrm dz/z$ on the Riemann sphere $\mathbf P^1$. What this means, by the way, is that I define $\omega$ in local coordinates on the chart $\mathbf P^1-\{\infty\}$ by $\omega=\mathrm dz/z$. Because of the isolated zeroes theorem, there is at most one form on $\mathbf P^1$ that coincides with $\mathrm dz/z$ on $\mathbf P^1-\{\infty\}$. To see that there is indeed such a form, you have to check that when you make a change of coordinates in $\mathrm dz/z$ to work in a chart around $\infty$, what you get is meromorphic. I choose the chart $\mathbf P^1-\{0\}$ with coordinate $w=1/z$; in that chart, the form is written $\omega=-\mathrm dw/w$ because $\mathrm dz=-\mathrm dw/w^2$. As you can see, $\mathrm{Res}_0(\omega)=1$ and $\mathrm{Res}_\infty(\omega)=-1$, so their sum is $0$.
Now, in general, take a compact Riemann surface $X$ and a meromorphic 1-form $\omega$ on $X$ with poles $p_1,\ldots,p_n$. Around each $p_i$, consider a small simple loop $\gamma_i$, and denote by $U_i$ the interior of the loop. Let $X'$ be the complement of $\bigcup_{i=1}^n U_i$ in $X$. The sum of the residues is
\begin{align}
\sum_{i=1}^n \mathrm{Res}_{p_i}(\omega)
&= \frac1{2i\pi}\sum_{i=1}^n \int_{\gamma_i}\omega\\
&= \frac1{2i\pi}\int_\gamma\omega
\end{align}
where $\gamma$ is the chain $\gamma_1+\cdots+\gamma_n$. Notice that the boundary of $X'$ is precisely $-\gamma$, so by Stokes' theorem you get
$$ \sum_{i=1}^n \mathrm{Res}_{p_i}(\omega)
= -\frac1{2i\pi}\iint_{X'}\mathrm d\omega.
$$
But $X'$ stays far away from the poles of $\omega$, so $\omega$ is holomorphic on a neighborhood of $X'$, hence $\mathrm d\omega=0$ on $X'$.
