Number of eigenvalues in a hessian across a closed region

Suppose $$F:\mathbb{R}^N\rightarrow \mathbb{R}^1$$ is in $$C^2$$. Denote the Hessian of $$F(x)$$ at point $$x$$ by $$H(x)$$.

Let $$S$$ be a closed subset of $$\mathbb{R}^N$$ and $$k_1,k_2$$ be positive real values. For all $$x_1,x_2 \in S$$ suppose the below is true:

$$|\det(H(x_1))-\det(H(x_2))|

And

$$|\det(H(x_1))|>k_2,|\det(H(x_2))|>k_2$$

Denote the number of positive eigenvalues of $$H(x)$$ by $$n(x)$$. I want to prove that, for all $$x_1,x_2\in S$$;

$$n(x_1)=n(x_2)$$

But am unsure where to start. I believe this should be true as a proof I am working through has quoted this end result under these conditions but I am unsure how to prove it.