  We establish the quantum fluctuations $\Delta Q_B^2$ of the charge $Q_B$
accumulated at the boundary of an insulator as an integral tool to characterize
phase transitions where a direct gap closes (and reopens), typically occurring
for insulators with topological properties. The power of this characterization
lies in its capability to treat different kinds of insulators on equal footing;
being applicable to transitions between topological and non-topological band,
Anderson, and Mott insulators alike. In the vicinity of the phase transition we
find a universal scaling $\Delta Q_B^2(E_g)$ as function of the gap size $E_g$
and determine its generic form in various dimensions. For prototypical phase
transitions with a massive Dirac-like bulk spectrum we demonstrate a scaling
with the inverse gap in one dimension and a logarithmic one in two dimensions.
