Stefan Geschke and Joel David Hamkins pointed out that this is a corollary of the proof of the Cantor-Bendixson theorem. In fact, we can strengthen the conclusion: X is not just $\Delta_2^0$, it is countable and scattered(*). And the proof, like that of Cantor-Bendixson's theorem, is simple: remove isolated points repeatedly until none remain (this may take more than $\omega$ steps and require ordinals, but a simple argument shows it only requires ordinals below $\omega_1$, and thus only countably many isolated points need to be removed).
(*Scattered implies $G_{\delta}$, though this is not trivial. Thus countable+scattered is strictly stronger than $\Delta_2^0$)
$\Delta^0_1$
is the same as clopen, so nonempty countable sets are not$\Delta^0_1$
. They are$\Sigma^0_2$
(i.e.,$F_\sigma$
), as Stefan said, but an additional argument is needed to get$\Pi^0_2$
(i.e.,$G_\delta$
). That argument will need something like scatteredness, since a countable dense set can't be$G_\delta$
by the Baire category theorem. $\endgroup$