A nonempty set is countable iff it is the image of a function whose domain is a nonempty countable set
Attempt:
Let $A$ be non empty and countable. If $A$ is countably infinite, we can find a bijection $f: \mathbb{N} \to A$. If I understand the problem correctly, I ${\bf need}$ to build a function $g: B \to A $ where $B$ is countable and $g(B) = A$. But, I have no idea how to proceed ? Can someone lead into the right direction?
The converse I believe is more manageable. Suppose there is some map whose domain is countable set then the image is also countable either finite or infinite... qed
I am still stuck on $\implies$ direction.
The definition of a countable set is all sets $S$ such that there exists an function $f: S \to \mathbb N$ which is injective.
To construct such a function $g: \mathbb N \to S$ ($\mathbb N$ is clearly countable), simply take the inverse of $f$ where it is defined, and map everything else to a random element of $S$. Since $f$ maps all elements of $S$ to a natural, you'll end up getting $S$ as your range.