Prove that the set of all algebraic numbers is countable. I'm a student in Korea.
If I make a mistake in grammar, please indicate.
Recently, I'm studying the book 'Principles of Mathematical Analysis'
So, I tried to solve the exercise #2 in chapter 2.
'A complex number $z$ is said to be algebraic if there are integer $a_0, \dots, a_n$ ,not all zero, such that  $a_0 z^n + a_1 z^{n-1} + \dots + a_n =0$ '
The hint is 'For every positive integer $N$ there are only finitely many equation with $n+|a_0|+...+|a_n|=N$'
Of course, I have searched this exercise on this site. But there were different methods.
I want to prove this exercise by using the hint. please help me.
 A: We define a height $h$ of a polynomial $a_0+a_1x+\cdots a_nx^n\in\mathbb{Z}[x]$ as $h=n+\sum_{i=0}^n|a_i|$. 
Clearly for a fixed $h$ there are only finitely many choices for $n$ and $a_i$ and so there are only finitely many polynomials of fixed height. 
Now we make a list of all the algebraic numbers in the following way: Consider any height $h\in\mathbb{N}$ and for all the finitely many polynomials of this height(here we use the hint), write down all the finitely many roots of these polynomials in the list. Keep repeating for all possible heights. It is clear that no algebraic number will be missed out in this list. This proves that the algebraic numbers are countable.
A: For every nonnegative integer $N$, define the set of polynomials
$$P_N:=\{(a_nz^n+\dots+a_1z+a_0) \,\mid\, n+|a_0|+\dots+|a_n|=N\}\,.$$
The hint says that $P_N$ is finite. 
Now, each polynomial has finite number of roots (counting with multiplicity, a polynomial $f$ has exactly $\deg(f)$ roots in $\Bbb C$).
Let $R_N$ be the set of all roots of polynomials in $P_N$: 
$$R_N:=\{\alpha\in\Bbb C\,\mid\,\exists f\in P_N\,:\,f(\alpha)=0\}\,.$$
So, $R_N$ is still finite.
Finally $\{$algebraic numbers$\}\ =\ \bigcup_{N\ge 0}R_N$.
