Question on residue theorem: finiteness of the sum I know that this question has been asked a few times before, but somehow I cannot find or come up with a satisfying answer. Consider the residue theorem:

Let $D \subseteq \mathbb{C}$ be open and $f$ be holomorphic except
  isolated singularities. Then for any cycle $\Gamma$ which is
  homologous to zero holds $$\int_\Gamma f(\zeta)d\zeta = 2\pi i \sum_{z
 \in D}n(\Gamma,z)\mathrm{res}_zf$$

The set where $n(\Gamma,z) \neq 0$ is relatively compact as the remark in the book I use states. By this, we have that only a finite number of singularities occur on the right hand side. 
I do not quite see why the set should be relatively compact and why then only a finite number of singularities lies in this set.
 A: The trace $\operatorname{Tr} \Gamma$ of $\Gamma$ is a compact subset of $D$. The winding number $n(\Gamma,z)$ is constant on every component of $U := \mathbb{C}\setminus \operatorname{Tr} \Gamma$, and it is zero on the unbounded component of $U$. Thus
$$A := \{ z \in U : n(\Gamma,z) \neq 0\}$$
is a bounded set, hence relatively compact in $\mathbb{C}$. And $\overline{A} \subset A \cup \operatorname{Tr} \Gamma$. That is true for all cycles.
Now we use the assumption that $\Gamma$ is homologous to zero, which is another way to say $A \subset D$. But then $K := A \cup \operatorname{Tr} \Gamma$ is a compact subset of $D$, so $A$ is relatively compact in $D$.
And a compact $C \subset D$ can contain only finitely many singularities of $f$, since $f$ has only isolated singularities in $D$. By compactness, every infinite subset of $C$ has an accumulation point in $C$. If $C$ contained infinitely many singularities of $f$, then those would accumulate at a point $p \in C$. But then $p$ would be a non-isolated singularity of $f$, contradicting the assumption that all singularities of $f$ in $D$ are isolated.
