[proofplan]
The only global input is second-countability. We begin with an arbitrary atlas and a countable basis for the topology of $M$. For each basis element that lies inside some chart domain, we choose one containing chart and restrict it to that basis element. These restricted charts are still valid charts, and the basis property ensures that they cover $M$.
[/proofplan]
[step:Handle the empty manifold by the empty atlas]
Assume first that $M=\varnothing$. The empty collection of charts has union $\varnothing$, hence covers $M$. Since there are no chart domains to verify, the chart conditions are vacuous. Therefore the empty collection is an atlas for $M$.
[/step]
[step:Choose a countable basis and an arbitrary atlas]
Assume now that $M\neq\varnothing$. Since $M$ is a [topological manifold](/page/Topological%20Manifold) and second-countability is part of the definition in force, there is a finite or countably infinite index set $A$ and a basis $\mathcal{B}=\{B_a\}_{a\in A}$ for the topology of $M$.
By the definition of a topological manifold, $M$ admits at least one atlas. Fix an atlas $\{(W_i,\psi_i)\}_{i\in I}$ for $M$, where each $W_i\subset M$ is open, the sets $W_i$ cover $M$, and each map
\begin{align*}
\psi_i: W_i &\to \psi_i(W_i)\subset \mathbb{R}^n
\end{align*}
is a homeomorphism onto an open subset $\psi_i(W_i)$ of $\mathbb{R}^n$.
Define
\begin{align*}
A_0:=\{a\in A: B_a\subset W_i \text{ for at least one } i\in I\}.
\end{align*}
For each $a\in A_0$, choose one index $i(a)\in I$ such that $B_a\subset W_{i(a)}$.
[/step]
[step:Restrict each chosen chart to the chosen basis element]
For each $a\in A_0$, define
\begin{align*}
\varphi_a: B_a &\to \psi_{i(a)}(B_a)
\end{align*}
\begin{align*}
p &\mapsto \psi_{i(a)}(p).
\end{align*}
Since $B_a\subset W_{i(a)}$, this is the restriction $\psi_{i(a)}|_{B_a}$. The set $B_a$ is open in $M$, and because $B_a\subset W_{i(a)}$, it is also open in the subspace $W_{i(a)}$. Since $\psi_{i(a)}:W_{i(a)}\to\psi_{i(a)}(W_{i(a)})$ is a homeomorphism, the image $\psi_{i(a)}(B_a)$ is open in $\psi_{i(a)}(W_{i(a)})$. Since $\psi_{i(a)}(W_{i(a)})$ is open in $\mathbb{R}^n$, it follows that $\psi_{i(a)}(B_a)$ is open in $\mathbb{R}^n$.
The restriction of a homeomorphism to an open subset of its domain is a homeomorphism onto its image. Hence each pair $(B_a,\varphi_a)$ is a chart on $M$.
[guided]
For each basis element $B_a$ that lies inside some chart domain, we want to reuse the existing coordinate map on that smaller [open set](/page/Open%20Set). Fix $a\in A_0$. By the definition of $A_0$, there exists at least one chart domain $W_i$ with $B_a\subset W_i$, and we have chosen one such index, denoted $i(a)$.
We define the restricted coordinate map by
\begin{align*}
\varphi_a: B_a &\to \psi_{i(a)}(B_a)
\end{align*}
\begin{align*}
p &\mapsto \psi_{i(a)}(p).
\end{align*}
This is a well-defined map because every point $p\in B_a$ lies in $W_{i(a)}$, the domain of $\psi_{i(a)}$.
Now we verify that $(B_a,\varphi_a)$ satisfies the chart condition. First, $B_a$ is open in $M$ because $\mathcal{B}$ is a basis for the topology of $M$. Since $B_a\subset W_{i(a)}$, the same set $B_a$ is open in the [subspace topology](/page/Subspace%20Topology) on $W_{i(a)}$.
The original chart map
\begin{align*}
\psi_{i(a)}: W_{i(a)} &\to \psi_{i(a)}(W_{i(a)})\subset\mathbb{R}^n
\end{align*}
is a homeomorphism onto an open subset of $\mathbb{R}^n$. A homeomorphism sends open subsets of its domain to open subsets of its codomain, so $\psi_{i(a)}(B_a)$ is open in $\psi_{i(a)}(W_{i(a)})$. Because $\psi_{i(a)}(W_{i(a)})$ is itself open in $\mathbb{R}^n$, openness is transitive: $\psi_{i(a)}(B_a)$ is open in $\mathbb{R}^n$.
Finally, the restriction $\psi_{i(a)}|_{B_a}$ is bijective from $B_a$ onto $\psi_{i(a)}(B_a)$, is continuous as a restriction of a continuous map, and has continuous inverse given by the restriction of $\psi_{i(a)}^{-1}$ to $\psi_{i(a)}(B_a)$. Thus $\varphi_a$ is a homeomorphism from $B_a$ onto an open subset of $\mathbb{R}^n$, so $(B_a,\varphi_a)$ is a valid chart.
[/guided]
[/step]
[step:Show the restricted charts cover the manifold]
We prove that the collection $\{B_a\}_{a\in A_0}$ covers $M$. Let $p\in M$. Since $\{(W_i,\psi_i)\}_{i\in I}$ is an atlas, there exists $i_p\in I$ such that $p\in W_{i_p}$. Since $W_{i_p}$ is open in $M$ and $\mathcal{B}$ is a basis, there exists $a_p\in A$ such that
\begin{align*}
p\in B_{a_p}\subset W_{i_p}.
\end{align*}
Thus $a_p\in A_0$ and $p\in B_{a_p}$. Since $p\in M$ was arbitrary, the domains of the charts $(B_a,\varphi_a)$ with $a\in A_0$ cover $M$.
[/step]
[step:Conclude that the selected atlas is finite or countably infinite]
The collection
\begin{align*}
\{(B_a,\varphi_a)\}_{a\in A_0}
\end{align*}
is an atlas for $M$, because each $(B_a,\varphi_a)$ is a chart and the domains $\{B_a\}_{a\in A_0}$ cover $M$. Since $A_0\subset A$ and $A$ is finite or countably infinite, the set $A_0$ is finite or countably infinite. Therefore $M$ admits an atlas indexed by a finite or countably infinite set. This proves the theorem.
[/step]