Here is a self contained answer to why Riemann's original theorem as he proved it, before Roch's refinement, is indeed an index statement. Traditionally, the “index” of a linear operator is the difference between the dimensions of its kernel and cokernel. Computing this difference is usually easier than computing either the kernel or cokernel dimensions alone, hence it is a helpful first step even where one of those dimensions is really wanted. Moreover the index gives an estimate of the kernel dimension. Riemann’s proof of his theorem was to calculate such an index as follows. Given a divisor $D$ of $r$ distinct points on a compact complex Riemann surface $X$ of genus g, he constructed a basis of the $g+r$ dimensional space $W \cong \mathbb{C}^{r+g}$ of corresponding differentials of “second kind”, i.e. having at worst principal part $\operatorname{const}.dz/(z-p)^2$ at each point $p$. Since the space $L(D)$ of meromorphic functions with at worst simple poles at these points maps with one dimensional kernel into the space $W$, in order to compute the dimension of $L(D)$ it suffices to compute the subspace of exact differentials in $W$, i.e. the kernel of the “period map”, obtained by integrating these differentials over a basis for the 1st homology of $X$. Thus he wants to compute the kernel of a linear map from $\mathbb{C}^{r+g}$ to $\mathbb{C}^{2g}$. It follows immediately from the rank/nullity theorem that the index of this period map is $(r+g)-2g = r-g = \deg(D)-g$. Hence this is a lower bound for the kernel, so $\dim L(D) – 1 \geq r-g$, i.e. $\dim L(D) \geq \deg(D) + 1-g$. This also implies the modern index form of the theorem as follows. Riemann knew the period map is injective on holomorphic differentials, so he could, and Roch did, replace it by a normalized period map from $\mathbb{C}^r$ to $\mathbb{C}^g \cong H^1(X;\mathbb{C})/H^1(X; K) \cong H^1(X;\mathcal{O})$. The cokernel of this map is now called $H^1(X;D)$, so Riemann’s theorem can be phrased $\chi(D) = h^0(D)-h^1(D) = \deg(D) + 1-g$. Since it takes some work to compute $\chi(\mathcal{O}) = h^0(\mathcal{O})-h^1(\mathcal{O})$ as $1-g$, this is actually stronger than the modern sheaf theoretic result that $\chi(D) – \chi(\mathcal{O}) = \deg(D)$, which follows immediately from the sheaf sequence $0 \to \mathcal{O} \to \mathcal{O}(D) \to \mathcal{O}(D)|_D \to 0$. Of course Riemann’s result should be stronger since it contains in addition to the trivial sheaf theoretic linear algebra, also the computation of both the holomorphic genus $= h^0(X; K)$, and the topological genus $= (1/2)h^0(X; \mathbb{C})$. Thus Riemann’s theorem combines the two modern results: $\chi(D) -\chi(\mathcal{O}) = \deg(D)$, and $\chi(\mathcal{O}) = 1-g$. Roch’s refinement of the RRT is to compute the cokernel $h^1(X;D)$ of Riemann’s period map, which he does of course by making a residue calculation. He obtains that $h^1(X;D) = h^0(X;K(-D))$, hence $h^0(D)-h^0(K(-D)) = \deg(D)+1-g$, the full RRT.