Index theorems for meromorphic self-maps of the projective space