  Using the $L^2$-norm of the Higgs field as a Morse function, we count the
number of connected components of the moduli space of parabolic $U(p,q)$-Higgs
bundles over a Riemann surface with a finite number of marked points, under
certain genericity conditions on the parabolic structure. This space is
homeomorphic to the moduli space of representations of the fundamental group of
the punctured surface in $U(p,q)$, with fixed compact holonomy classes around
the marked points. We apply our results to the study of representations of the
fundamental group of elliptic surfaces of general type.
