Solution: We will be using two facts.
Let $\mathcal{P}_n$ denotes the set of all polynomial of degree $n$ with integer coefficients and $\mathcal{P} $ denotes the set of all polynomials with integer coefficient. Let $\mathbb{N}_0 = \mathbb{N} \cup\{0\}$. We will first show that for every $n\in \mathbb{N}_0$ the set $\mathcal{P} _n$ is countable. Then we note that $\mathcal{P} =\cup_{n\in \mathbb{N}_0 }\mathcal{P} _n$ is the countable union of countable sets and hence countable.
Define the map \begin{gather*} \phi:\mathcal{P}_n \to \mathbb{Z}^{n+1};\\ a_0+a_1x+a_2x^{2}+\cdots + a_nx^{n}\mapsto \left( a_0,a_1,a_2,\cdots,a_n \right). \end{gather*}
The above map is an injection. For proving that let \begin{align*} & \phi \left( \sum_{i=0}^{n}a_ix^i \right) = \phi\left( \sum_{i=0}^{n}b_ix^i \right) \\ & \implies (a_0,\cdots,a_n)=(b_0,\cdots,b_n)\\ & \implies a_i=b_i,\,\,\text{for }i=0,\ldots,n \\ & \implies \sum_{i=0}^{n}a_ix^i = \sum_{i=0}^{n}b_ix^i. \end{align*} Thus, $\phi $ is an injective map.
As $\mathbb{Z} ^{n+1}$ is the finite Cartesian product of the countable set $\mathbb{Z} $, hence countable, and thus $\mathcal{P} _n$ is countable. Therefore, $\mathcal{P} =\cup_{n\in \mathbb{N} _0}$ is countable.