(Riemann--Roch for curves)
Let \(C\) be a smooth projective curve of genus \(g\) and \(D\) a divisor of degree \(d\) on \(C\). Then \[ h^0\qty{\OO_C(D)} - h^0\qty{\OO_C(K_C - D)} = d - g + 1 , \] equivalently \(\chi\qty{\OO_C(D)} = d - g + 1\). In particular \(h^0(D) - h^0(K_C - D) = \deg D - g + 1\).
(Riemann--Roch for surfaces)
Let \(X\) be a smooth projective surface with canonical divisor \(K\), and \(D\) any divisor. Then \[ \chi\qty{\OO_X(D)} = \chi\qty{\OO_X} + \frac{1}{2} D \cdot (D - K) . \]
The curve case is the same statement with \(\deg\) in place of the intersection pairing, and the surface case is the first one where the correction term is quadratic rather than linear. \(\chi(\OO_X) = 1 - q + p_g\) is the constant, with \(q = h^1(\OO_X)\) the irregularity.
What it is used for is existence, not counting. Serre duality turns \(h^2(D)\) into \(h^0(K-D)\), so \[ h^0(D) \geq \chi(\OO_X) + \tfrac{1}{2} D\cdot(D-K) - h^0(K - D) , \] and once \(D\) is positive enough that \(K - D\) has no sections, a large right-hand side forces \(h^0(D) > 0\) and hence \(D\) effective. That inequality gives a standard sufficient criterion for nonemptiness of a linear system.
Dependencies
T-COHSDSerre duality in dimension $n$usesD-COHEULERThe Euler characteristic and the Hilbert polynomialuses