For a closed path γ and z∈/imγ, the index is
Indγ(z)=2iπ1∫γw−zdw.
It is an integer: setting φ(t)=∫atγ(s)−zγ′(s)ds, the function (γ(t)−z)e−φ(t) has zero derivative (piecewise), hence is constant; at t=b, eφ(b)=γ(a)−zγ(b)−z=1, so φ(b)∈2iπZ. As a function of z, the index is continuous on C∖imγ (dominated convergence), hence constant on each connected component, and 0 on the unbounded component (ML: the integral tends to 0 as z→∞). For the circle γ(t)=a+reit, t∈[0,2π]: Indγ(z)=1 for z∈D(a,r) (compute at z=a: 2iπ1∫02πreitrieitdt=1; constancy does the rest).