Possible values of $\int \frac{dz}{\sqrt{1-z^2}}$ over a closed curve in a region? This is related to Ahlfors' problem #5 following section 4.4.7.
Let $\sigma$ be a path in $\mathbb{C}$ starting at $-1$ and ending at $+1$.
Let $\gamma$ be a closed curve in $\mathbb{C}$ which does not intersect $\sigma$.  
You can show there is an analytic branch of $\sqrt{1-z^2}$ defined on $\mathbb{C}\setminus\sigma$.
Question: What are the possible values of $\displaystyle\int_{\gamma} \frac{dz}{\sqrt{1-z^2}}$ ?
Guess at answer: The set of values $2\pi k$ for integer $k$.  
It feels to me like I should be able to reduce the situation to the integral $\displaystyle\int_{-1}^{+1} \frac{dz}{\sqrt{1-z^2}}$ on the segment of the real axis, then take advantage of the fact that the integral $\displaystyle\int_{+1}^{-1} \frac{dz}{\sqrt{1-z^2}}$ on the segment with the opposite orientation, and using the other branch of the function, does not cancel the first integral.
Another thought that I had was to try to relate the integral to a winding number.
This section on Ahlfors develops the general Cauchy theorem for curves homologous to zero, talks about multiply connected domains, and develops the notion of homology basis.
I would appreciate answers containing only hints, rather that full solutions, but they will be accepted if useful.
Thank you very much.
Note: The original problems as stated in the book is

Show that a single-valued analytic branch of $\sqrt{1-z^2}$ can be defined in any region such that the points $\pm1$ are in the same component of the complement. What are the possible values of $\displaystyle\int \frac{dz}{\sqrt{1-z^2}}$ over a closed curve in the region?

 A: Lemma. If $a,b$ belong to the same component of $\mathbb C\smallsetminus\Omega$, then $g(z)=\log (\frac{z-a}{z-b})$ is definable as a holomorphic function in $\Omega$.
Proof. For any closed curve $\gamma$ in $\Omega$ it is clear that
$\mathrm{Ind}_\gamma(a)=\mathrm{Ind}_\gamma(b)$, and hence $G(z)=\frac{1}{z-a}-\frac{1}{z-b}$
possesses a primitive in $\Omega$. If $f:\Omega\to\mathbb C$ is a primitive of $G$, then
$$
\Big(\frac{z-b}{z-a}\exp\big(f(z)\big)\Big)'=\exp\big(f(z)\big)
\bigg(\Big(\frac{z-b}{z-a}\Big)'+f'(z)\frac{z-b}{z-a}\bigg)=\cdots =0,
$$
and hence $\frac{z-b}{z-a}\exp\big(f(z)\big)$ is constant (a non-negative one). We define $g(z)=f(z)+c$, where $c\in\mathbb C$, is chosen that $\exp\big(f(z)+c\big)=\frac{z-a}{z-b}$.
Then the function $h(z)=(z-b)\exp(g(z)/2)$ satisfies $h^2(z)=(z-a)(z-b)$.
Next, for $a=-1$ and $b=1$, and $g(z)=\sqrt{z^2-1}$, it can be shown that
$$
\lim_{z\to\infty}\frac{\sqrt{1-z^2}}{z}=i \quad\text{or}\quad \lim_{z\to\infty}\frac{\sqrt{1-z^2}}{z}=-i,
$$
and if the first holds, then
$$
\frac{1}{\sqrt{1-z^2}}-\frac{1}{iz}=\frac{iz-\sqrt{1-z^2}}{iz\sqrt{1-z^2}}={\mathcal O}(z^{-3}),
$$
as $z\to\infty$, thus if a curve $\gamma\in\Omega$ is simple closed, positive oriented and includes $\sigma$, then
$$
\int_\gamma \frac{dz}{\sqrt{1-z^2}}=\int_{|z|=R} \frac{dz}{\sqrt{1-z^2}}=\lim_{R\to\infty}\int_{|z|=R} \frac{dz}{\sqrt{1-z^2}}=\lim_{R\to\infty}\int_{|z|=R} \frac{dz}{iz}.
$$
Hence, $\int_\gamma \frac{dz}{\sqrt{1-z^2}}$ can take any value in $2\pi\mathbb Z$. (Not  $2\pi i\mathbb Z$.)
A: 
It feels to me like I should be able to reduce the situation to the integral $\int_{-1}^{+1} \frac{dz}{\sqrt{1-z^2}}$ on the segment of the real axis, then take advantage of the fact that the integral $\int_{+1}^{-1} \frac{dz}{\sqrt{1-z^2}}$ on the segment with the opposite orientation, and using the other branch of the function, does not cancel the first integral.

Indeed. Pick an $R > 0$ large enough that the trace of $\sigma$ is contained in $D_R(0)$, and replace $\gamma$ by a homologous path $\tilde{\gamma}$ whose trace is contained in $\mathbb{C}\setminus \overline{D_R(0)}$. By Cauchy's integral theorem, that doesn't alter the integral. Now extend your branch of $\sqrt{1-z^2}$ from $\mathbb{C}\setminus \overline{D_R(0)}$ to $\mathbb{C}\setminus [-1,1]$ by analytic continuation.

 And then replace $\tilde{\gamma}$ by a homologous dogbone contour close to $[-1,1]$. Take the limit as the horizontal segments converge to the interval and the circular arcs around $\pm 1$ shrink to points.

A: Details for myself, based on Daniel Fischer's answer.
The integrand $f(z)$ is analytic on $\mathbb{C}\setminus\sigma$.
$\sigma \subset \mathbb{C}\setminus \gamma$, where $\gamma$ is the path for the integral.
$\sigma$ connected, so is contained in one of the components of $\mathbb{C}\setminus \gamma$.
The winding number $n(\gamma;z)$ is constant on $\sigma$.
If $\Lambda$ parametrizes the boundary of a large rectangle, then $n(\Lambda, z) = 1$ on $\sigma$.
Let $K = n(\gamma, a)$ for some $a \in \sigma$.
$\Lambda$ is a homology basis for $\mathbb{C}\setminus\sigma$, and $\gamma - K\Lambda$ is  homologous to zero with respect to $\mathbb{C}\setminus\sigma$.
By general Cauchy theorem, $\int_{\gamma}f(z)dz = K\int_{\Lambda}f(z)dz$.
There is an analytic branch $g(z)$ of $\frac{1}{\sqrt{1-z^2}}$ defined on the complement of $[-1, 1]$.
$g(z) = f(z)$ on $\Lambda$.
Replace the integral of $f$ with the integral of $g$.
Shrink the rectangle to a dogbone contour around $[-1, 1]$.
Evaluate over horizontal line segments as a real integrals, taking advantage of sign change as your cross the branch. 
