Question:
Let $f$: $\mathbb{N} \rightarrow \mathbb{Z}$ be a function that is eventually zero. i.e: There exists some $N \in \mathbb{N}$ s.t $f(n)=0$ for all $n \geq \mathbb{N}$. Prove that the set of such functions is countable.
Proof:
Define $g$: $\mathbb{N} \rightarrow \mathbb{Z}$ s.t $$ g(i) = \left\{ \begin{array}{ll} f(i) & \quad i \in \{0,1…N-1\} \\ 0 & \quad , otherwise \end{array} \right. $$
Let $B_n=\{h|h: \{0,1…N-1\}\rightarrow \mathbb{Z}$}. Clearly, $B_n$ is equal to $N$ copies of $\mathbb{Z}$. Hence, it's countable.
Let $G=\{f|f: \mathbb{N}\rightarrow \mathbb{Z}\}$ is eventually zero}. So, $G = \cup_{N=1}^{\infty} B_n$. Countable union of countable sets is countable. So is $G$.
Is my approach correct?
The basic idea is good, but you rather want to take the union of $G_N$'s where $$G_N:=\{f:\Bbb N\to\Bbb Z:f(n)=0\text{ if } n>N\}$$