NOTE: I know that countability of algebraic numbers has been proven on this site before, but I'm concerned about this specific hint they give and I don't know how to prove it using that advice.
I am solving an exercise in Rudin to prove that the set of algebraic numbers is countable. In particular,
A complex number is said to be algebraic if there are integers $a_0, \dots, a_n$, not all $0$, such that $a_0 z^n + a_1 z^{n-1} + \dots + a_n = 0$. Prove that the set of all algebraic numbers is countable.
Hint: For every positive integer $N$ there are only finitely many equations with $n + |a_0| + |a_1| + \dots + |a_n| = N$
I have proven the statement using essentially the method in this post, but I'm curious as to how one can use the hint to prove the statement.