Spectral flow of paths of self-adjoint Fredholm operators