Where am I wrong?: "countability" and "recursive enumerability"
Your algorithm for recursively enumerating any given set doesn't work since the bijection between a countable set $X$ and the natural numbers can be arbitrarily complicated. For example, consider the following set $X$:
$$ X = \{ P : \text{the program coded by $P$ doesn't halt on the empty string as input} \}. $$
The set $X$ is countable: there are only countably many programs. However, there is no computable bijection between $X$ and the natural numbers, since otherwise RE=coRE (as your argument shows; $X$ is coRE-complete).

Here is a more tangible example of a countable set for which there is no computable bijection:
$$ Y = \{ 2P : \text{program $P$ halts on the empty string} \} \cup \{ 2P+1 : \text{program $P$ doesn't halt on the empty string} \}. $$
If there was a computable bijection between $Y$ and the natural numbers, then you could solve the halting problem (how?).