In the introduction to Bott and Tu, “Differential forms in algebraic topology” there is the motivating example of a stationary point charge in $3$-space. The electromagnetic field $\omega$ is a $2$-form on $X=\mathbb{R}^4\setminus \mathbb{R}$, and the Hodge star of this generates the de Rham cohomology $H^2(X)=\langle \star\omega \rangle$. As a passing remark, it is claimed that the class $[\star\omega]$ can thus be interpreted as the charge of the source.
Assuming little background in electromagnetism, I’d be grateful for an explanation. In particular what is the physical significance of $\star\omega$ and why is the physical quantity of charge the same as a cohomology class of space-time?
The electromagnetic field of a point charge is
$$\omega=\frac{q}{r^3}\, dt\wedge\left(x\, dx+y\, dy+z\, dz\right)$$
where $r=\sqrt{x^2+y^2+z^2}$, where $q\in \mathbb{R}$ is its charge. With the Minkowski metric, $g=-dt^2+dx^2+dy^2+dz^2$, one has
$$\star\omega=-\frac{q}{r^3}\left(x\, dy\wedge dz+y\, dz\wedge dx+z\, dx\wedge dy\right)$$
Integration on the hypersurface with $x^2+y^2+z^2=1$, i.e. $S^2\times \mathbb{R}$, provides a linear map $\Omega^2(\mathbb{R}^4\setminus \mathbb{R})\to \mathbb{R}$ which extends to an isomorphism on cohomology
$$H^2_{\textrm{dR}}(\mathbb{R}^4\setminus\mathbb{R})\xrightarrow{\sim} \mathbb{R}$$
One can see that this integral is nonzero on $\star \omega$ and proportional to $q$, and thus via this isomorphism, the hodge dual of $\omega$ is sent to the charge $q$.