The theorem (as I know it) only allows for a finite set of isolated singularities.
I integrated, along a square box, a function that has simple poles at all the non-zero integers -- and a triple pole at zero. Then I let the box get infinitely large to help prove that the sum of $1/n^2$ is $\pi^2 / 6$.
But why can the Residue Theorem still be applied, even though the box is getting infinitely large, and the poles will eventually become an infinite set?
...I know that a box is compact, and poles at the integers means this set of poles is a discrete set, hence the set of poles in this compact box ...is finite. But something about taking the limit is bugging me.