  Results are obtained on extending flat vector bundles or equivalently general
representations from the fundamental group of S, a connected subsurface of the
connected boundary of a compact, connected, oriented 3-dimensional manifold, to
the whole manifold M. These are applied to representations of fundamental
groups of 3-dimensional rational homology cobordisms. The proofs use the
introduction and complete computation up to sign of new numerical invariants
which "count with multiplicities and signs" the number of representations up to
conjugacy of the fundamental group of M to the unitary group U(n) (resp., the
special unitary group SU(n)) which when restricted to S are conjugate to a
specified irreducible representation, rho, of the fundamental group of S. These
invariants are inspired by Casson's work on SU(2) representations of closed
manifolds. All the invariants treated here are independent of the choice of
rho.
  If T equals the difference of the Euler characteristics of S and M and is
non-negative, then a T times (dim U(n)) (resp., dim SU(n)) cycle is produced
that carries information about the space of such U(n) (resp., SU(n))
representations. For T = 0, the above integer invariant results and it is
entirely computed up to sign.
  For T > 0, under the assumption that rho sends each boundary component of S
to the identity, a list of invariants for U(n) (resp. SU(n)) results which are
expressed as a homogeneous polynomial in many variables, reminiscent of the
work of Donaldson on 4-manifolds.
