[proofplan]
We show that the winding number function $z_0 \mapsto n(\gamma, z_0)$ is continuous on $\mathbb{C} \setminus \operatorname{im}(\gamma)$. Since $\mathbb{C} \setminus \operatorname{im}(\gamma)$ is open and the winding number is integer-valued, continuity forces it to be constant on each connected component. For the unbounded component, we show $|n(\gamma, z_0)| \to 0$ as $|z_0| \to \infty$ by estimating the contour integral directly, which forces $n(\gamma, z_0) = 0$ on the entire unbounded component.
[/proofplan]
[step:Show that $z_0 \mapsto n(\gamma, z_0)$ is continuous on $\mathbb{C} \setminus \operatorname{im}(\gamma)$]
Fix $z_0 \in \mathbb{C} \setminus \operatorname{im}(\gamma)$ and let $\delta := \operatorname{dist}(z_0, \operatorname{im}(\gamma)) > 0$, where $\operatorname{dist}(z_0, \operatorname{im}(\gamma)) := \inf_{t \in [a,b]} |z_0 - \gamma(t)|$. This infimum is positive because $\operatorname{im}(\gamma)$ is compact (as the continuous image of $[a,b]$) and $z_0 \notin \operatorname{im}(\gamma)$.
For any $w \in \mathbb{C}$ with $|w - z_0| < \delta/2$, we have $|w - \gamma(t)| \geq |z_0 - \gamma(t)| - |w - z_0| > \delta/2$ for all $t \in [a,b]$. Then:
\begin{align*}
n(\gamma, w) - n(\gamma, z_0) &= \frac{1}{2\pi i} \oint_\gamma \left(\frac{1}{z - w} - \frac{1}{z - z_0}\right) dz \\
&= \frac{1}{2\pi i} \oint_\gamma \frac{w - z_0}{(z - w)(z - z_0)}\, dz.
\end{align*}
Let $L := \int_a^b |\gamma'(t)|\, d\mathcal{L}^1(t)$ denote the length of $\gamma$. Estimating the integrand:
\begin{align*}
|n(\gamma, w) - n(\gamma, z_0)| &\leq \frac{1}{2\pi} \cdot \frac{|w - z_0|}{(\delta/2) \cdot \delta} \cdot L = \frac{|w - z_0| \cdot L}{\pi \delta^2}.
\end{align*}
As $w \to z_0$, the right-hand side tends to $0$, so $z_0 \mapsto n(\gamma, z_0)$ is continuous at $z_0$.
[guided]
We want to show the winding number depends continuously on the point $z_0$, so that small perturbations of $z_0$ (staying away from the curve) produce small changes in $n(\gamma, z_0)$.
Fix $z_0 \in \mathbb{C} \setminus \operatorname{im}(\gamma)$. Since $\operatorname{im}(\gamma) = \gamma([a,b])$ is the continuous image of the compact set $[a,b]$, it is compact. The function $t \mapsto |z_0 - \gamma(t)|$ is continuous on $[a,b]$ and never zero (since $z_0 \notin \operatorname{im}(\gamma)$), so it attains a positive minimum. Define $\delta := \operatorname{dist}(z_0, \operatorname{im}(\gamma)) = \min_{t \in [a,b]} |z_0 - \gamma(t)| > 0$.
Now take any $w$ with $|w - z_0| < \delta/2$. By the triangle inequality, for every $t \in [a,b]$:
\begin{align*}
|w - \gamma(t)| \geq |z_0 - \gamma(t)| - |w - z_0| > \delta - \delta/2 = \delta/2.
\end{align*}
So $w$ also lies in $\mathbb{C} \setminus \operatorname{im}(\gamma)$ and both winding numbers are well-defined. We compute their difference by subtracting the integral representations:
\begin{align*}
n(\gamma, w) - n(\gamma, z_0) &= \frac{1}{2\pi i} \oint_\gamma \frac{1}{z - w}\, dz - \frac{1}{2\pi i} \oint_\gamma \frac{1}{z - z_0}\, dz \\
&= \frac{1}{2\pi i} \oint_\gamma \frac{(z - z_0) - (z - w)}{(z - w)(z - z_0)}\, dz \\
&= \frac{1}{2\pi i} \oint_\gamma \frac{w - z_0}{(z - w)(z - z_0)}\, dz.
\end{align*}
Let $L := \int_a^b |\gamma'(t)|\, d\mathcal{L}^1(t)$ be the arc length of $\gamma$. Applying the standard contour integral estimate $\left|\oint_\gamma g(z)\, dz\right| \leq \sup_{z \in \operatorname{im}(\gamma)} |g(z)| \cdot L$, we bound the integrand: for $z \in \operatorname{im}(\gamma)$, $|z - z_0| \geq \delta$ and $|z - w| > \delta/2$, so
\begin{align*}
|n(\gamma, w) - n(\gamma, z_0)| &\leq \frac{1}{2\pi} \cdot \frac{|w - z_0|}{(\delta/2) \cdot \delta} \cdot L = \frac{|w - z_0| \cdot L}{\pi \delta^2}.
\end{align*}
As $w \to z_0$, this bound tends to zero, establishing continuity of the winding number at every point of $\mathbb{C} \setminus \operatorname{im}(\gamma)$.
[/guided]
[/step]
[step:Deduce local constancy from continuity and integer-valuedness]
The set $\mathbb{C} \setminus \operatorname{im}(\gamma)$ is open (as the complement of the compact set $\operatorname{im}(\gamma)$). The function $z_0 \mapsto n(\gamma, z_0)$ is continuous on this open set and takes values in $\mathbb{Z}$. Since $\mathbb{Z}$ carries the discrete topology as a subspace of $\mathbb{R}$, the preimage of each singleton $\{k\}$ under $n(\gamma, \cdot)$ is both open and closed in $\mathbb{C} \setminus \operatorname{im}(\gamma)$. On each connected component $U$ of $\mathbb{C} \setminus \operatorname{im}(\gamma)$, the only subsets that are both open and closed in $U$ are $\varnothing$ and $U$ itself. Therefore $n(\gamma, \cdot)$ takes a single value on each connected component.
[guided]
We have established that $n(\gamma, \cdot): \mathbb{C} \setminus \operatorname{im}(\gamma) \to \mathbb{Z}$ is continuous when $\mathbb{Z}$ is given its usual (discrete) topology inherited from $\mathbb{R}$. In the discrete topology, every singleton $\{k\} \subset \mathbb{Z}$ is both open and closed. Therefore the preimage $n(\gamma, \cdot)^{-1}(\{k\})$ is both open and closed in $\mathbb{C} \setminus \operatorname{im}(\gamma)$.
Now let $U$ be a connected component of $\mathbb{C} \setminus \operatorname{im}(\gamma)$. A connected space has no proper nonempty clopen subsets. Suppose $n(\gamma, \cdot)$ takes two distinct values $k_1 \neq k_2$ on $U$. Then $U \cap n(\gamma, \cdot)^{-1}(\{k_1\})$ would be a nonempty proper clopen subset of $U$, contradicting connectedness. Therefore $n(\gamma, z_0)$ is constant on $U$.
[/guided]
[/step]
[step:Show $n(\gamma, z_0) = 0$ on the unbounded component]
Let $R := \max_{t \in [a,b]} |\gamma(t)|$, which is finite since $\operatorname{im}(\gamma)$ is compact. For $|z_0| > R$, the point $z_0$ lies in the unbounded component of $\mathbb{C} \setminus \operatorname{im}(\gamma)$. We estimate:
\begin{align*}
|n(\gamma, z_0)| &= \left|\frac{1}{2\pi i} \oint_\gamma \frac{dz}{z - z_0}\right| \leq \frac{1}{2\pi} \cdot \frac{L}{|z_0| - R}
\end{align*}
where we used that for $z \in \operatorname{im}(\gamma)$, $|z - z_0| \geq |z_0| - |z| \geq |z_0| - R > 0$, and $L = \int_a^b |\gamma'(t)|\, d\mathcal{L}^1(t)$ is the arc length. As $|z_0| \to \infty$, the right-hand side tends to $0$. Since $n(\gamma, z_0) \in \mathbb{Z}$ and $|n(\gamma, z_0)| < 1$ for $|z_0|$ sufficiently large, we conclude $n(\gamma, z_0) = 0$ for such $z_0$. By the constancy established in the previous step, $n(\gamma, z_0) = 0$ on the entire unbounded component.
[guided]
We must show the winding number vanishes on the unbounded connected component. The strategy is to take $z_0$ very far from the curve and show the integral becomes arbitrarily small — but since the winding number is an integer, "arbitrarily small" forces it to be zero.
Let $R := \max_{t \in [a,b]} |\gamma(t)|$. This maximum exists and is finite because $|\gamma(\cdot)|$ is continuous on the compact set $[a,b]$. Every point $z_0$ with $|z_0| > R$ satisfies $z_0 \notin \operatorname{im}(\gamma)$ (since all points of the image have modulus at most $R$). Moreover, the set $\{z \in \mathbb{C} : |z| > R\}$ is connected (it is the complement of a closed disc) and unbounded, so it is contained in the unbounded component of $\mathbb{C} \setminus \operatorname{im}(\gamma)$.
For $z \in \operatorname{im}(\gamma)$ and $|z_0| > R$, the reverse triangle inequality gives $|z - z_0| \geq |z_0| - |z| \geq |z_0| - R > 0$. Therefore:
\begin{align*}
|n(\gamma, z_0)| = \frac{1}{2\pi} \left|\oint_\gamma \frac{dz}{z - z_0}\right| \leq \frac{1}{2\pi} \cdot \sup_{z \in \operatorname{im}(\gamma)} \frac{1}{|z - z_0|} \cdot L \leq \frac{L}{2\pi(|z_0| - R)}.
\end{align*}
Choosing $|z_0| > R + L/(2\pi)$ makes the right-hand side strictly less than $1$. Since $n(\gamma, z_0) \in \mathbb{Z}$ and $|n(\gamma, z_0)| < 1$, we must have $n(\gamma, z_0) = 0$. Since the winding number is constant on the unbounded component (by the previous step), $n(\gamma, z_0) = 0$ for every $z_0$ in that component.
[/guided]
[/step]