Prove that the no of solutions of the equation $f(z)=w$, counted with Multiplicities for $w$ varying in $D_2$, is constant on $D_2$ 
Prove that the no of solutions of the equation $f(z)=w$, counted with Multiplicities for $w$ varying in $D_2$, is constant on $D_2$.

Def: A map $f\colon X \to Y$ is said to be proper if $f^{-1}(K)$ is compact for every compact set $K$ in $Y$. 
Domain: Open connected Set.
Let $D_1$ and $D_2$ be domains in $ \mathbb C$. Suppose $f\colon D_1 \to D_2 $ is a proper holomorphic mapping. Prove that the number of solutions of the equation $f(z)=w$, counted with multiplicities, for $w$ varying in $D_2$ is constant on $D_2$.
Can someone please give some hints/ideas?
 A: Step 0: A proper holomorphic map is not constant.
For if $f(z) \equiv w_0$, then $f^{-1}(\{w_0\}) = D_1$ is not compact, although the singleton set $\{w_0\}$ is compact.
Step 1: For each $w\in D_2$, the fibre $f^{-1}(\{w\})$ is finite.
Since $f$ is not constant, the fibre is discrete. A discrete compact space is finite.
Step 2: The function $N\colon D_2 \to \mathbb{N}$, where $N(w)$ is the number of times the value $w$ is attained by $f$, counting multiplicities, is continuous.
Let $w_0\in D_2$, and $r > 0$ so small that $\overline{D_r(w_0)} = \{ w\in \mathbb{C} : \lvert w-w_0\rvert \leqslant r\} \subset D_2$. Since $f$ is proper,
$$K := \{ z \in D_1 : \lvert f(z) - w_0\rvert \leqslant r\}$$
is compact. There is a piecewise smooth cycle $\Gamma$ in $D_1$ that is nullhomologous in $D_1$ and has $n(\Gamma,z) = 1$ for all $z\in K$. [$n(\Gamma,z)$ is the winding number of the cycle $\Gamma$ around $z$.] Then for $w\in D_r(w_0)$, we have
$$N(w) = \frac{1}{2\pi i} \int_{\Gamma} \frac{f'(\zeta)}{f(\zeta) - w}\,d\zeta,\tag{1}$$
which is continuous since the integrand depends continuously on $w$. Since $w_0$ was arbitrary, $N$ is continuous on $D_2$.
Step 3: A continuous function from a connected space to a discrete space is constant.

Equation $(1)$ is the application of the residue theorem known as the argument principle.
The existence of a cycle $\Gamma$ with the desired properties may not be immediately obvious. In case it is not known, below is an outline of a proof of the

Proposition: Let $U\subset \mathbb{C}$ be open, and $K\subset U$ compact. Then there is a cycle $\Gamma$ in $U$, consisting of straight line segments, such that $$n(\Gamma,z) = 0$$ for all $z \in \mathbb{C}\setminus U$ (that is, $\Gamma$ is nullhomologous in $U$), and $$n(\Gamma,z) = 1$$ for all $z\in K$.

Proof sketch: If $K = \varnothing$, the empty cycle has the desired properties. Henceforth, we therefore assume $K\neq \varnothing$. Let
$$d = \min \{ 1, \operatorname{dist}(K,\mathbb{C}\setminus U)\}.$$
Choose $k\in \mathbb{N}$ such that $2^{2-k} < d$. For $a+ib \in \mathbb{Z}[i]$, let
$$R_{a+ib} = 2^{-k}\cdot \{z \in \mathbb{C} : a \leqslant \operatorname{Re} z \leqslant a+1,\; b \leqslant \operatorname{Im} z \leqslant b+1\}.$$
Then consider $I(K) = \{\omega \in \mathbb{Z}[i] : R_\omega \cap K \neq \varnothing\}$. Since $K$ is bounded, $I(K)$ is compact. If $\omega \in I(K)$, and $z_0 \in K\cap R_\omega$, then
$$R_\omega \subset D_{2^{1/2-k}}(z_0) \subset U$$
and therefore
$$\int_{\partial R_\omega} \frac{d\zeta}{\zeta-z} = 0$$
for all $z\notin U$. Let
$$R := \bigcup_{\omega\in I(K)} R_\omega$$
and $\Gamma = \partial R$. The $\Gamma$ consists of boundary segments of some of the $R_\omega$, hence of straight line segments, and
$$\int_{\Gamma} \frac{d\zeta}{\zeta - z} = \sum_{\omega \in I(K)} \int_{\partial R_\omega} \frac{d\zeta}{\zeta - z} = 0,$$
since if a boundary segment of $R_{\omega}$ doesn't occur in $\Gamma$, it is traversed in the opposite direction as a boundary segment of one of the neighbouring squares - $R_{\omega + \alpha}$, where $\alpha \in \{ 1,i,-1,-i\}$, depending on whether it is the right, upper, left, or lower boundary segment of $R_\omega$ - and that part of the integral is cancelled in the sum. Thus $\Gamma$ is nullhomologous in $U$.
If $z_0 \in K$, then there is at least one $\omega\in I(K)$ with $z_0\in R_\omega$. If $z_0 \in \overset{\Large\circ}{R}_\omega$, then $z_0 \notin R_\alpha$ for $\alpha \in I(K)\setminus \{\omega\}$, and hence
$$n(\gamma, z_0) = \sum_{\alpha \in I(K)} n(\partial R_\alpha, z_0) = n(\partial R_\omega, z_0) = 1.$$
The cases where $z_0$ lies on the common boundary segment of two $R_\omega$ (but not on a corner) or on a corner shared by four $R_\omega$, the argument to show that $n(\gamma,z_0) = 1$ is similar.
A: This approach probably will over-kill the problem :p. Anyway, here how it goes: Assume $f$ is a non-constant proper holomorphic map.
First, note that since $f$ is a holomorphic, $f$ is an open map. In particular because $D_1$ is an open subset of $\mathbb{C}$, so is $f(D_1)$ an open subset of $D_2$. On the other hand, $f$ being proper forces its image to closed. To see this, let $y$ be a limit point $f(D_1)$. Then we can find a sequence of $\{y_n:=f(z_n)\}\subset f(D_1)$, where $\{z_n\}\subset D_1$ such that $y_n\rightarrow y$. Now consider $K:=\{y_n\}\cup\{y\}$. Note that $K$ is sequential compact subset of $D_2$, thus also compact. Thus, $f^{-1}(K)$ is also compact in $D_1$. $\{z_n\}$ now being a sequence in a compact subset of $D_1$ has a convergent sub-sequence, say $z_{n_k}\rightarrow z$ in $D_1$. So by continuity of $f$, $f(z_{n_k})\rightarrow f(z)$. This means that $f(z)=y$. Or equivalently, $y\in f(D_1)$. 
The point is, $f(D_1)$ is both an open and closed subset of a connected set $D_2$. Therefore, it must be the case that $f(D_1)=D_2$. In other words, $f$ is surjective.
Now the fact that $D_1$ and $D_2$ are open connected subsets of $\mathbb{C}$ is important. Identify $\mathbb{C}=\mathbb{R^2}$ for a moment, $D_1$ and $D_2$ can be viewed as connected submanifolds (smooth and same dimension!) of $\mathbb{R^2}$. $f$ is holomorphic, so it is certainly a smooth map (in the usual sense) from $D_1$ onto $D_2$. Then for any $p\in D_1$, I claim that the differential $(f_*)_p:T_{p}(D_1)\longrightarrow T_{f(p)}(D_2)$ is surjective.
Indeed, let $f(x,y)=u(x,y)+iv(x,y):=(u(x,y),v(x,y))$. Recall the definition of the differential at $p:$ $$(f_*)_p(q)=\begin{pmatrix}
  u_x(p) & u_y(p)  \\
  v_x(p) & v_y(p)  \\
  \end{pmatrix}.q$$
But we can do better! The holomorphicity of $f$ implies that $u$ and $v$ satisfy the Cauchy-Riemann Equations. So we can rewrite the differential map as follow $$(f_*)_p(q)=\begin{pmatrix}
  u_x(p) & -v_x(p)  \\
  v_x(p) & u_x(p)  \\
  \end{pmatrix}.q$$
Since $f$ is non-constant, that means $u_x(p)$ and $v_x(p)$ can't be simultaneously zero. So the matrix of the differential map is full rank. Therefore, $(f_*)_p$ is surjective. And because $p$ is chosen arbitrarily, this means that every point in $f(D_1)=D_2$ is a regular value. 
Now let $q$ be any point in $D_2$. Since $f$ is surjective, the inverse image of $q$ is non-empty. Furthermore note that the singleton $\{q\}$ is compact in $D_2$. So the inverse image $q$ is compact in $D_1$, and with $f$ being non-constant holomorphic map, $f^{-1}(q)$ is also discrete. Thus it is finite. Set this finite number $n(q)$ to be the multiplicity of $q$. And define an equivalent relation on $D_2$ as follow $$x\sim y \Leftrightarrow n(x)=n(y)$$
Think of $q$ also as a regular value of $f$. In our case, since the two Euclidean spaces have the same dimension, the differential $f_*$ is surjective if and only if it is an isomorphism. Then if $\{x_1,x_2,\cdots, x_{n(q)}\}$ is the set of points get mapped to $q$, the inverse function theorem tells us that around each point $x_i$, $f$ is a local diffeomorphism.That is, if $B$ is a open disk around $q$ that is also a subset of $D_2$ (such disk exists because $D_2$ is open), $f^{-1}(B)$ is a countable union of open disk $B_i$ around each $x_i$ such that $f|_{B_i}$ is a diffeomorphism. So now let $p$ be any point in $B$. No two distinct points in the inverse image of $p$ lies in the same open set $B_i$ (Or else it would violate the fact $f|_{B_i}$ is injective!). This shows that each point in the inverse image of $p$ lies in each distinct set $B_i$. And thus $n(p)=n(q)$. So $[q]$ is open. But under $\sim$, $D_2$ is partitioned into open disjoint equivalence classes and $D_2$ is connected. The only time this is possible is when $[q]=D_2$. 
Therefore, the multiplicity of each point is constant as the point varies through $D_2$.
