The Witten index and the spectral shift function