Index Theory for Symplectic Matrix Paths with Applications