How could I easily see that such space is countably compact？

Let $X$ be Hausdorff. There is a Theorem:

If the closure of every discrete subspace of $X$ is $H$-closed, then $X$ is compact.

(A topological space $X$ is said to be $H$-closed, or Hausdorff closed, or absolutely closed if it is closed in every Hausdorff space space containing it as a subspace. This property is a generalization of compactness, since a compact subset of a Hausdorff space is closed. Thus, every compact Hausdorff space is H-closed. The notion of an $H$-closed space has been introduced in 1924 by P. Alexandroff and P. Urysohn.)

In the process of prove, author said it is easy to see that $X$ is countably compact. However, I find it is difficult for me to get it. My question is this, just as the title explains:

How could I easily see that such space is countably compact？

-
Suppose that $X$ is not countably compact, and let $\{U_n:n\in\omega\}$ be an open cover of $X$ with no finite subcover. Without loss of generality we may assume that $U_n\subsetneqq U_{n+1}$ for each $n\in\omega$. For $n\in\omega$ fix $x_n\in U_{n+1}\setminus U_n$; since $X$ is $T_1$, $\{x_n:n\in\omega\}$ is easily seen to be a closed, discrete set in $X$. Now let
$$f:\{x_n:n\in\omega\}\to\Bbb R:x_n\mapsto 2^{-n}\;;$$
clearly $f$ embeds $\{x_n:n\in\omega\}$ as a non-closed subspace of $\Bbb R$, so $\{x_n:n\in\omega\}$ is a closed, discrete subset of $X$ that is not $H$-closed, contradicting the hypothesis on $X$.