  We prove a simple identity relating the length spectrum of a Riemann surface
to that of the same surface with an arbitrary number of additional cusps. Our
proof uses the Brownian loop measure introduced by Lawler and Werner. In
particular, we express the total mass of Brownian loops in a fixed free
homotopy class on any Riemann surface in terms of the length of the geodesic
representative for the complete constant curvature metric. This expression also
allows us to write the electrical thickness of a compact set in $\mathbb C$
separating $0$ and $\infty$, or the Velling--Kirillov K\"ahler potential, in
terms of the Brownian loop measure and the zeta-regularized determinant of
Laplacian as a renormalization of the Brownian loop measure with respect to the
length spectrum.
