I'm looking for a reference for the following: Suppose that $f_1,f_2\colon S^n\rightarrow S^n$ are smooth maps. Let $i\colon S^n\rightarrow \mathbb{R}^{n+1}$ be the inclusion, and suppose that $F\colon S^n\times I \rightarrow \mathbb{R}^{n+1}$ is a smooth homotopy of $i\circ f_1$ and $i\circ f_2$. Moreover, suppose that 0 is a regular value for $F$. Then $$\deg(f_2)-deg(f_1)=d(F),$$ where $d(F)$ is the Brouwer degree of $F$ (i.e., $d(F)$ is $F^{-1}(0)$ counted with signs given by the Jacobian). When $F^{-1}(0)=\emptyset$ this follows from the classical Hopf theorem, but I'm not sure how to prove this in general (though it should be equally classical).