Let me give a proof that makes use of the ordering inherited from $\mathbb{R}$.
Suppose that $A\subseteq\mathbb{R}$ is a countable compact space. Then $A$ has no subset $B$ order isomorphic to the rational numbers (otherwise $A$ would be uncountable). I now claim that the order topology on $A$ is isomorphic to the subspace topology on $A$. To avoid confusion, let $\mathcal{O}$ be the order topology on $A$ and let $\mathcal{S}$ be the subspace topology on $A$. It is well known that for every ordered set, the subspace topology is finer than the order topology, i.e. $\mathcal{O}\subseteq\mathcal{S}$. However, since $(A,\mathcal{S})$ is compact, we have $\mathcal{O}=\mathcal{S}$, so the order topology and the subspace topology coincide on $A$. In particular, since $A$ is complete as an ordered set, $A$ is a complete lattice by this answer of mine.
Let $\mathcal{H}_{0}$ be the set of all finite and countable successor ordinals. Let $\mathcal{H}_{\alpha}$ be the collection of all sums $\sum_{i\in B}B_{i}$ where $B_{i}\in\bigcup_{\beta<\alpha}\mathcal{H}_{\beta}$ for each $\beta<\alpha$ and where $B=\omega+1$,$B=(\omega+1)^{*}$ or $B$ is finite.
I claim that $\bigcup_{\alpha<\omega_{1}}\mathcal{H}_{\alpha}$ is precisely the collection of all countable complete linear orders (this is a slight modification of a result by Hausdorff proven here). Suppose that $X$ is a countable compact linear ordering that is not in $\bigcup_{\alpha<\omega_{1}}\mathcal{H}_{\alpha}$. Then it is easy to show that there exists some $x\in X$ with $[0,x_{1/2}],[x_{1/2},1]\not\in\bigcup_{\alpha<\omega_{1}}\mathcal{H}_{\alpha}$. In other words, we can cut $X$ into two pieces not in $\bigcup_{\alpha<\omega_{1}}\mathcal{H}_{\alpha}$. Now cut each piece $[0,x_{1/2}],[x_{1/2},1]$ into pieces $[0,x_{1/4}],[x_{1/4},x_{1/2}],[x_{1/2},x_{3/4}],[x_{3/4},1]$. Continue this process until we have obtained an $x_{r/2^{n}}$ for all $n\in\omega$ and $0<r<\frac{1}{2^{n}}$ and we have obtained an isomorphic copy of the rational numbers. This is a contradiction since $X$ cannot contain a copy of the rational numbers.
I claim that for each ordinal $\alpha$, each $X\in\mathcal{H}_{\alpha}$ is homeomorphic to some countable ordinal, and this claim shall be proven by transfinite induction. Suppose that $\alpha$ is an ordinal and assume that whenever $\beta<\alpha$ each $X\in\mathcal{H}_{\beta}$ is homeomorphic to some ordinal. Now assume that $X\in\mathcal{H}_{\alpha}$. If $X=\sum_{i\in B}B_{i}$ where $B$ is finite and for each $i\in B$ we have $B_{i}\in\mathcal{H}_{\beta_{i}}$ for some $\beta_{i}<\alpha$, then clearly $X$ is homeomorphic to some ordinal. Therefore without loss of generality, we can assume that $X=\sum_{\alpha\in\omega+1}B_{\alpha}$. Then let $W_{n}$ be a well ordered set and let $h_{n}:B_{n}\rightarrow W_{n}$ be a homeomorphism for all $n\in\omega$.
Let $0_{\omega}$ be the least element in $B_{\alpha}$.
If $0_{\omega}$ is not a limit point of $B_{\alpha}$, then since $B_{\alpha}$ is homeomorphic to a well ordered set, one can easily show that there exists an isomorphism $h_{\omega}:0_{\omega}\rightarrow W_{\omega}$ such that $0_{\omega}$ is the least element of $W_{\omega}$. Then define a mapping $h:\sum_{\alpha\in\omega+1}B_{\alpha}\rightarrow
\sum_{\alpha\in\omega+1}W_{\alpha}$ by letting $h(x,\alpha)=(h_{\alpha}(x),\alpha)$. Then $H$ can easily be seen to be a homeomorphism.
Now assume that $0_{\omega}$ is a limit point of $B_{\alpha}$. Then let $(x_{n})_{n\in\omega}$ be a descending sequence in $B_{\omega}$ that converges to $0_{\omega}$ and such that $x_{0}$ is the greatest element of $B_{\omega}$ and where if
$n\neq 0$, then $x_{n}$ has an immediate successor $y_{n-1}$.
For all $n\in\omega$, let $Y_{n}$ be a well ordered set and let $j_{n}:[y_{n},x_{n}]\rightarrow Y_{n}$ be an homeomorphism.
Let $Z_{2n}=W_{n}$ and let $Z_{2n+1}=Y_{n}$ for each $n\in\mathbb{N}$, and let $Z_{\omega}=\{0^{\omega}\}$ for some element $0^{\omega}$. Let
$k:\sum_{\alpha\in\omega+1}B_{\alpha}\rightarrow\sum_{\alpha\in\omega+1}Z_{\alpha}$ be the mapping where $k(x,n)=(h_{n}(x),2n)$ for $n\in\omega$, $k(x,\omega)=(j_{n}(x),2n+1)$ for $x\in[y_{n},x_{n}]$ and $k(0_{\omega},\omega)=(0^{\omega},\omega)$. Then $k$ is a homeomorphism. Therefore each countable compact subspace $A\subseteq\mathbb{R}$ is homeomorphic to some successor ordinal.
Suppose that $\omega^{\alpha_{n}}a_{n}+...+\omega^{\alpha_{0}}a_{0}$ is an ordinal in Cantor's normal form. Then by putting the initial segment $\omega^{\alpha_{n}}a_{n}+1$ last instead of first, we conclude that $\omega^{\alpha_{n}}a_{n}+...+\omega^{\alpha_{0}}a_{0}$ is homeomorphic to $\omega^{\alpha_{n}}a_{n}+1$. In particular, if two countable compact sets $X,Y$ have the same Cantor-Bendixson rank $\alpha+1$ and $|X^{(\alpha)}|=|Y^{(\alpha)}|$, then $X\simeq Y$.
Also take note that it is easy to prove that every compact countable metric space is isomorphic to a subspace of $\mathbb{R}$. If $X$ is a countable compact space, then $C(X)$ is a Banach space. However, whenever $x,y\in X$ are distinct elements, then $A_{x,y}\subseteq\{f\in C(X)|f(x)=f(y)\}$ is a closed nowhere dense subspace of $C(X)$. Therefore by the Baire category theorem, $\bigcup_{x\neq y}A_{x,y}$ contains no open subset of $C(X)$ and if $f\in C(X)\setminus\bigcup_{x\neq y}A_{x,y}$, then $f$ is injective. Since $X$ is compact, the set $X$ and its image $f[X]$ are homeomorphic.