  We define a weighted multiplicity function for closed geodesics of given
length on a finite area Riemann surface. These weighted multiplicities appear
naturally in the Selberg trace formula, and in particular their mean square
plays an important role in the study of statistics of the eigenvalues of the
Laplacian on the surface.
  In the case of the modular domain, E. Bogomolny, F. Leyvraz and C. Schmit
gave a formula for the mean square, which was rigorously proved by M. Peter. In
this paper we calculate the mean square of weighted multiplicities for some
surfaces associated to congruence subgroups of the unit group of a rational
quaternion algebra, in particular for congruence subgroups of the modular
group. Remarkably, the result turns out to be a rational multiple of the mean
square for the modular domain.
