How would one show that $\textbf{Z}$ is countable? I am trying to show that the set of all integers $\mathbb{Z}$ is indeed countable which would mean that $|\mathbb{N}|=|\mathbb{Z}|$.
This would further imply that I have to find a bijection between the two sets, but I do not really know how to do that.
I have tried with a function $f:\mathbb{N}\longrightarrow \mathbb{Z}$ such that all the odd numbers are mapped to the positive subset of $\mathbb{Z}$, and all even numbers are mapped to the negative numbers.
I think that this will produce a valid solution but I don't have the details yet, and I also do not really know how to account for zero in all of this.
Any help on the matter would be much appreciated.

Another possible bijection (likely similar to one you were thinking of) would be:
$$f(x)=\begin{cases}
\frac n2 &\text{$n$ is even}\\
-\frac {n+1}{2}\quad &\text{$n$ is odd}
\end{cases}$$
