  The Maslov index is a powerful tool for computing spectra of selfadjoint,
elliptic boundary value problems. This is done by counting intersections of a
fixed Lagrangian subspace, which designates the boundary condition, with the
set of Cauchy data for the differential operator. We apply this methodology to
constrained eigenvalue problems, in which the operator is restricted to a (not
necessarily invariant) subspace. The Maslov index is defined and used to
compute the Morse index of the constrained operator. We then prove a
constrained Morse index theorem, which says that the Morse index of the
constrained problem equals the number of constrained conjugate points, counted
with multiplicity, and give an application to the nonlinear Schr\"odinger
equation.
