Surjection from Natural Numbers iff Countable

Theorem
Let $S$ be a non-empty set.

Then $S$ is countable iff there exists a surjection $f: \N \to S$.

Necessary Condition
Suppose that $f: \N \to S$ is a surjection.

By Surjection from Natural Numbers iff Right Inverse, $f$ admits a right inverse $g: S \to \N$.

We have that $g$ is an injection by Right Inverse Mapping is Injection.

Hence the result, by the definition of a countable set.

Sufficient Condition
Suppose that $S$ is countable and non-empty.

Then there is an injection $g: S \to \N$.

By Injection has Surjective Left Inverse Mapping, there is a surjection $f: \N \to S$.