I believe that you are looking for ideas from the Cantor Bendixson theorem.
The main idea of the proof is the Cantor-Bendixson derivative. Given a closed set $X$, the derived set $X'$ consists of all limit points of $X$. That is, one simply throws out the isolated points. Continuing in a transfinite sequence, one constructs $X_\alpha$ as follows:
- $X_0=X$, the original set.
- $X_{\alpha+1}=(X_\alpha)'$, the set of limit points of $X_\alpha$.
- $X_\lambda=\bigcap_{\alpha\lt\lambda}X_\alpha$, for limit ordinals $\lambda$.
Thus, $X_1$ consists of the limit points of $X$, and $X_2$ consists of the limits-of-limits, and so on. The set $X_\omega$ consists of points that are $n$-fold limits for any particular finite $n$, and $X_{\omega+1}$ consists of limits of those kind of points, and so on. The process continues transfinitely until a set is reached which has no isolated points; that is, until a perfect set is reached. The Cantor Bendixon rank of a set is the smallest ordinal $\alpha$ such that $X_\alpha$ is perfect.
The concept is quite interesting historically, since Cantor had undertaken this derivative before he developed his set theory and the ordinal concept. Arguably, it is this derivative concept that led Cantor to his transfinite ordinal concept.
It is easy to see that the ordinal $\omega^\alpha+1$ under the order topology has rank $\alpha+1$, and one can use this to prove a version of your desired theorem.
The crucial ingredients you need are the Cantor Bendixson rank of your space and the number of elements in the last nonempty derived set. From this, you can constuct the ordinal $(\omega^\alpha+1)\cdot n$ to which your space is homeomorphic.
Meanwhile, every countable ordinal is homeomorphic to a subspace of $\mathbb{Q}$, and is metrizable. The compact ordinals are precisely the successor ordinals (plus 0).
Update 5/11/2011. This brief article by Cedric Milliet contains a proof of the Mazurkiewicz-Sierpiński theorem (see
Stefan Mazurkiewicz and Wacław Sierpiński, Contribution à la topologie des
ensembles dénombrables, Fundamenta Mathematicae 1, 17–27, 1920), as follows:
Theorem 4. Every countable compact
Hausdorff space is homeomorphic to some well-ordered set with the order topology.
The article proves more generally that any two countable locally compact Hausdorff spaces $X$ and $Y$ of same Cantor-Bendixson rank and degree are homeomorphic. This is proved by transfinite induction on the rank, and the proof is given on page 4 of the linked article.