What is the number of analytic functions with certain fixed points on a domain? 
I am struggling with the following question: 
How many analytic functions $f:D\rightarrow \mathbb{C}$ are there that fulfill >$f(\frac{1}{n\cdot\pi})=1,\ n\in\mathbb{N}$ if $D$ is:
  \begin{align*}
a)\quad&D=\{z\in\mathbb{C}:|z-1|<1\}\\
b)\quad&D=\{z\in\mathbb{C}:|z-\frac{1}{2}|<1\}
\end{align*}
  I know that $f(z)=cos\left(\frac{2}{z}\right)$ is a solution, but I don't know >how you can prove whether or not there are others. Furthermore, I don't see how >the number of analytic functions would differ over the two domains.
Thanks in advance for any help!

I have gotten the hint to use the identity theorem. As Daniel Fischer pointed out, $\lim_{z\rightarrow \infty} \frac{1}{n\pi}=0$, so the sequence has an accumulation point in $z=0$, which is encompassed in the second domain, but not in the first domain.
I am still uncertain what the consequences of this are. Does this mean that in the first domain there are infinite functions, because of the reasons Accumulation pointed out, while in the second domain there is only one, because it has an accumulation point?
 A: I have gotten the answer from my lecturer and for completeness sake I will post it.
The function $f(z)=cos(\frac{2}{z})$ satisfies the condition. The identity theorem states that if there is another function $g(z)$ such that the set $\{ z\in \mathbb{C}:g(z)=f(z)\}$ has an accumulation point in the domain, the functions are the same (and therefore there is only one unique function). As Daniel Fischer pointed out, $\lim_{n\rightarrow\infty}=0$, so any function fulfilling the condition $f(\frac{1}{n\pi})=1$ has an accumulation point at $z=0$.
Now we can go into the two cases:
In the first case, the domain does not include $z=0$. The identity theorem states that the accumulation point has to be in the domain, so on this domain there is no unique function satisfying the condition. Therefore there are (as Accumulation pointed out) infinite functions that satisfy this condition.
On the second domain, the point $z=0$ is included, so the accumulation point is in the domain. Therefore $f(z)=cos(\frac{2}{z})$ would be the only solution. However, in $z=0$ $f$ has an essential singularity and is therefore not analytic. So there are no analytic functions on this domain except for the constant function $f(z)=1$.
A: It seems to me that:
f(x) = 1 is a solution
f(2m/z) is a solution for any integer m (note that m=0 give f(x) = 1)
if f(x) is a solution, then so is f(x)^m for any integer m
if f(x) and g(x) are solutions, then f(x)g(x) and af(x)+(1-a)g(x) are solutions for any a.
