  We study the Schr\"odinger operator $L=-\Delta+V$ on a star-shaped domain
$\Omega$ in $\mathbb{R}^d$ with Lipschitz boundary $\partial\Omega$. The
operator is equipped with quite general Dirichlet- or Robin-type boundary
conditions induced by operators between $H^{1/2}(\partial\Omega)$ and
$H^{-1/2}(\partial\Omega)$, and the potential takes values in the set of
symmetric $N\times N$ matrices. By shrinking the domain and rescaling the
operator we obtain a path in the Fredholm-Lagrangian-Grassmannian of the
subspace of $H^{1/2}(\partial\Omega)\times H^{-1/2}(\partial\Omega)$
corresponding to the given boundary condition. The path is formed by computing
the Dirichlet and Neumann traces of weak solutions to the rescaled eigenvalue
equation. We prove a formula relating the number of negative eigenvalues of $L$
(the Morse index), the signed crossings of the path (the Maslov index), the
number of negative eigenvalues of the potential matrix evaluated at the center
of the domain, and the number of negative squares of a bilinear form related to
the boundary operator.

Spectral Theory;Analysis of PDEs;Functional Analysis;Symplectic Geometry