Discreteness of Preimages of points, map between compact riemann surfaces Let $f:X\rightarrow Y$ be a non-constant holomorphic map between compcat riemann surfaces, we need to show $f^{-1}(y),\forall y\in Y$ is finite and discrete subset of $X$.
What if $X$ and $Y$ are non compact?
well, $f$ is onto clearly, and I understand some how I need to use the fat that $Zeros$ of $f$ is a discrete set, but I am not able to write rigoriously the answer.
 A: a) If $X$ and $Y$ are non compact it certainly is not clear that $f$ is onto since it is false: think of the inclusion of a disk into $\mathbb C$.
b) It is not true either that the fibers $f^{-1}(y)$ are finite: think of the sinus function $\sin:\mathbb C\to \mathbb C$ with $\sin^{-1}(0)=\pi \mathbb Z$, an infinite set.
c) It is however true that the fibers $f^{-1}(y)\; (y\in Y)$ are discrete closed subsets of $X$: closedness follows from continuity of $f$ and discreteness  can be checked locally at points of $x\in X$.
This means  that in order to  check it you may assume that $X$ and $Y$ are disks containing the origin and that $x=0, f(x)=0$.
You may then invoke the result that zeros of non-constant holomorphic functions are isolated.
A: I will add a little bit to George's fine answer.
I believe that the property you're looking for is properness. A map is called proper if inverse images of compact subsets are again compact.
As georges pointed out, the fibers will be discrete and since a point is clearly compact, the fiber will be compact discrete, hence finite.
When i learned about this theorem in class, the teacher gave it for compact surfaces and mentioned its extension to the proper case. Therefore i believe that this is the most general statement of the theorem.
Hope that helps.
