Your map $\Bbb Q\to \Bbb Z \times (\Bbb Z\setminus\{0\})$ is not well-defined: $\frac{1}{2}$ maps to $(1,2)$ but $\frac{1}{2}=\frac{2}{4}$ so it should be mapped to $(2,4)$ too, etc. A rational number is an equivalence class of pairs of integers, and to define a function on it, it should not depend on the representative of the class.
The other way around is better: send $(n,m) \in \Bbb Z \times (\Bbb Z\setminus\{0\}) \to \frac{n}{m} \in \Bbb Q$. This at least is well-defined and surjective (all rationals have such a representation, in fact many of them).
A set $A$ can be shown to be countable by either
- giving a bijection with a set $N$ you already know to be countable, or
- a surjection from such an $N$ onto $A$, or
- an injection from $A$ into such an $N$.
We've now done the second and so we're done, assuming you know that $\Bbb Z \times (\Bbb Z\setminus\{0\})$ is countable (product of two countable sets).