For $|a|<1$, the branch cut for $\log{(1-a z)}$ is on the real axis, for $z > 1/|a|$. Thus, we can write
$$\oint_{|z|=1} dz \frac{\log{(1-a z)}}{z} = 0$$
because $\frac{\log{(1-a z)}}{z}$ has no poles within $|z| \le 1$. Substitute $z=e^{i \theta}$ to get
$$i \int_0^{2 \pi} d\theta \log{(1-a e^{i \theta})} = i \int_0^{2 \pi} d\theta \log{|1-a e^{i \theta}|} - \int_0^{2 \pi} d\theta \: \arg{(1-a e^{i \theta})} = 0$$
Equating real and imaginary parts, we get the desired result for $|a| < 1$. For $|a|=1$, the circle $|z|=1$ passes through the branch cut so that Cauchy's theorem does not apply. In this case, we indent the circle $|z|=1$ near $z=1$ by an arc $\gamma$ on the circle $|z-1|=r$ to produce a contour $\Gamma$ and consider the limit $r \rightarrow 0$. On $\gamma$, we may show that
$$\left | \frac{\log{(1-z)}}{z} \right | \le \frac{\log{\frac{1}{r}}}{1-r}$$
because, for very small $r$, $\arg{(1-z)} \approx 0$ and $|z| > 1-r$ on $\gamma$. The magnitude of the integral over $\gamma$ is thus bounded by
$$\left | \int_{\gamma} dz \frac{\log{(1-z)}}{z} \right | \le 2 r \frac{\log{\frac{1}{r}}}{1-r} \arccos{\frac{r}{2}} $$
which goes to zero in the limit of $r \rightarrow 0$.
We may then show that, on the indented contour $\Gamma$:
$$\oint_{\Gamma} dz \frac{\log{(1-z)}}{z} = 0$$
By the same reasoning as above (equating real and imaginary parts), we see that
$$\int_0^{2 \pi} d\theta \log{|1- e^{i \theta}|} = 0$$
and the desired result follows.
Interestingly, though, we may show this explicitly. Let $z=e^{i \theta}$, $dz/z = i d\theta$, then
$$i \int_0^{2 \pi} d\theta \log{(1-e^{i \theta})} = 0$$
Now
$$\log{(1-e^{i \theta})} = \log{|1-e^{i \theta}|} +i \arg{(1-e^{i \theta})}$$
It turns out that
$$\arg{(1-e^{i \theta})} = \arctan{\frac{\sin{\theta}}{1-\cos{\theta}}} = \arctan{(\cot{\frac{\theta}{2}})} = \frac{\pi}{2} - \frac{\theta}{2}$$
$$\int_0^{2 \pi} d\theta \: \arg{(1-e^{i \theta})}= \int_0^{2 \pi} d\theta \left ( \frac{\pi}{2} - \frac{\theta}{2} \right ) = \frac{\pi}{2} 2 \pi - \frac{1}{4} (2 \pi)^2 = 0 $$
$$\therefore \int_0^{2 \pi} d\theta \log{|1-e^{i \theta}|} = 0$$
Note that $a=1$. Then rewrite your equation as
$$z=e^z P(z)$$
where $P(z)$ is a polynomial of degree $n$. For $|z|$ large enough, $P$ grows of order $|z|^n$. Therefore this equation implies upon taking absolut values that $e^{\mathrm{Re} z}$ decreases like $|z|^{1-n}$ as $|z|\rightarrow\infty$. This is clearly a contradiction.
Therefore you cannot apply Hadamard's theorem, i.e. $f$ has infinitely many zeros.
Best Answer
Note that for $|a|=1$, we can write $a=e^{i\psi}$. Then, exploiting the $2\pi$-periodicity of the integrand, we have
$$\begin{align} \int_{-\pi}^\pi \log|1-ae^{i\theta}|\,d\theta&=\int_{-\pi}^\pi \log|1-e^{i(\theta+\psi)}|\,d\theta\\\\ &=\int_{-\pi+\psi}^{\pi+\psi} \log|1-e^{i\theta}|\,d\theta\\\\ &=\int_0^{2\pi}\log|1-e^{i\theta}|\,d\theta \end{align}$$
METHODOLOGY 1:
Note that we have $|1-e^{i\theta}|=\sqrt{2(1-\cos(\theta))}=2|\sin{\theta/2}|$. Now, we have
$$\int_0^{2\pi}\log|1-e^{i\theta}|\,d\theta=4\int_0^{\pi/2}\log(2\sin(\theta))\,d\theta=0$$
since $\int_0^{\pi/2}\log(\sin(\theta))\,d\theta=-\frac{\pi}{2}\log(2)$
METHODOLOGY 2:
Now, we cut the complex plane with a line from $(1,0)$ and extending along the positive real axis.
Note that $\log(1-z)$ is analytic within and on a closed contour $C$ defined by $z=e^{i\phi}$ for $\epsilon \le \phi \le 2\pi -\epsilon$, and $z=1+2\sin(\epsilon/2) e^{i\nu}$ for $\pi/2 + \gamma \le \nu \le 3\pi/2 -\gamma$, where $ \cos(\gamma)=\frac{\sin \epsilon}{\sqrt{2(1-\cos \epsilon)}}$ and $0 \le \gamma <2\pi$ on this branch of $\gamma$.
Then, from the residue theorem, we have
$$\int_C \frac{\log(1-z)}{z}dz=2\pi i \log(1-0)=0$$
which implies
$$\begin{align} \int_C \frac{\log(1-z)}{z} dz&=\int_{\epsilon}^{2\pi-\epsilon} \log(1-e^{i\phi})i d\phi+\int_{3\pi/2-\gamma}^{\pi/2+\gamma} \frac{\log(-2\sin(\epsilon/2) e^{i\nu})}{1+2\sin(\epsilon/2) e^{i\nu}}i2\sin(\epsilon/2) e^{i\nu}d\nu\\\\ &=i\int_{\epsilon}^{2\pi-\epsilon} \log(1-e^{i\phi}) d\phi+ i2\sin(\epsilon/2) \int_{3\pi/2-\gamma}^{\pi/2+\gamma} \frac{\log(-2\sin(\epsilon/2)e^{i\nu})e^{i\nu}d\nu}{1+2\sin(\epsilon/2)e^{i\nu}} \\\\ &=i\int_{\epsilon}^{2\pi-\epsilon} \log|1-e^{i\phi}| d\phi -i \int_{\epsilon}^{2\pi-\epsilon} \arctan \left(\frac{\sin \phi}{1-\cos \phi}\right)d\phi \\\\ &+ i2\sin(\epsilon/2) \int_{3\pi/2-\gamma}^{\pi/2+\gamma} \frac{\log(-2\sin(\epsilon/2)e^{i\nu})e^{i\nu}d\nu}{1+2\sin(\epsilon/2)e^{i\nu}} \\\\ &=0 \end{align}$$
As $\epsilon \to 0$ the first term on the RHS approaches $i$ times the integral of interest. The second term approaches zero since $\arctan(\frac{\sin \phi}{1-\cos \phi})$ is an odd, $2\pi$-periodic function of $\phi$ and the integration extends over the entire period. And the last term approaches $0$ since $x\log x \to 0$ as $x \to 0$. Thus, the integral of interest is zero!