I've learned that the dimension of $H_{dR}^0(M)$ — the $0^{\text{th}}$De Rham Cohomology Group of a manifold $M$ — equals the number of connected components of $M$. But if $M = \mathbb{R} \setminus \{0\}$, then according to Wikipedia:
$$\dim H_{dR}^0(M) = 1.$$
But $\mathbb{R} \setminus \{0\}$ clearly has two connected components, so I'm confused as to how this can be possible. Any clarification would be much appreciated! Thanks.
You are correct. The statement in Wikipedia is not correct. They are trying to cover the de Rham cohomology groups $H^k_{\text{dR}}(\mathbb{R}^n\setminus\{0\})$ for all $k$ and $n$ simultaneously, but overlooked this exceptional case.