Problem: Suppose that $A$ is a countable set. Show that the set $B$ is also countable if there is an onto function $f:A\to B$.
Solution: Let $\phi:A\to B$ be surjective. Given that $A$ is countable, we need to show that $B$ is also countable. Since $\phi$ is surjective, for every $b\in B$ we can find $a_b\in A$ such that $\phi \left(a_b\right)=b$. Consider the set \[ \tilde{A} = \left\{a_b:b\in B\right\} \subseteq A. \] As $\tilde{A}$ is a subset of $A$ and $A$ is countable, $\tilde{A}$ will also be countable. Now note that \[ \phi\big|_{\tilde{A}} :\tilde{A} \to B \] is a bijective function and hence $B$ is also countable.