My book is From Calculus to Cohomology by Ib Madsen and Jørgen Tornehave.
This is the definition of local index:
Corollary 11.10 says if $f$ isn't surjective, then $\deg(f) = 0$, I guess by empty sum is zero. So, $\deg(f)=0$, but I don't think we necessarily have that each $\text{Ind}(f;q)$ is zero. It seems we have four cases. Which is it, and why?
Case 1: $\text{Ind}(f;q)$ is meant to be for $p$ regular value and in the image of $f$. Therefore, $\text{Ind}(f;q)$ is undefined for $p$ not in the image of $f$.
Case 2: $\text{Ind}(f;q)$ can be defined for $p$ regular value but not in the image of $f$. Vacuously, $\text{Ind}(f;q) = 1$
Case 3: $\text{Ind}(f;q)$ can be defined for $p$ regular value but not in the image of $f$. The convention is that $\text{Ind}(f;q) = 0$
Case 4: Other
Some context: