Solution (source code)

= Solution

List pairs $(m,n)\in\mathbb N^2$ by increasing value of $m+n$, and within each diagonal by increasing $m$:
$$
(1,1),\ (1,2),(2,1),\ (1,3),(2,2),(3,1),\ldots.
$$
Every pair occurs after finitely many earlier diagonals. More explicitly, the <Cantor pairing function>
$$
\pi(m,n)=\frac{(m+n-2)(m+n-1)}2+m
$$
is an injection $\mathbb N^2\to\mathbb N$. Hence $\mathbb N\times\mathbb N$ is countable.