Definition: If $M \subset \mathbb{R}^k$ and $N \subset \mathbb{R}^d$ are two smooth oriented varieties and if $f: M \to N$ is smooth then we define $$ \operatorname{sgn}(d_x f)= \begin{cases} \phantom{-}1 &\mbox{ if it brings a positive oriented basis to a positive oriented basis,}\\ -1 &\mbox{ otherwise. }\\ \end{cases}$$
My problem: Let be $\mathbb{D}^n$ be the closed unit ball in $\mathbb{R}^n$ and $$s: \mathbb{D}^n \to \mathbb{R}^{n+1}-\{0\}$$ defined as follow
$$s(x)=(e^{-\frac{1}{1-\|x\|^2}}x,1-2e^{1-\frac{1}{1-\|x\|^2}})$$ for $\|x\|<1$ and $s(x)=(0,...,0,1)$ for $\|x\|=1$.
Define $g(x)=\frac{s(x)}{\|s(x)\|}$ and $f:\mathbb{R}^n \to \mathbb{S}^n$ defined as follow:
$$f(x)= \begin{cases} g(x) &\mbox{ if } x \in \mathbb{D}^n, \\ (0,...,0,1) &\mbox{ otherwise. } \end{cases}$$
It is clear that $f$ is a smooth map between varieties. Suppose $y \in \mathbb{S}^n$ is a regular value for $f$. How can I prove $\sum\limits_{x \in f^{-1}(y)} \operatorname{sgn}(d_xf)=1$?