The signature of a non-degenerate symmetric bilinear map $h:V\times V\to \mathbb{R}$ in a vector space $V$ is the number of negative numbers on the diagonal of the matrix $h_{ij} = h(e_i,e_j)$ when it's diagonalized. Sylvester's Law of Inertia guarantees that this number does not change under change of basis, so the signature of $h$ is well defined. This is clear to me.
A semi-riemannian metric on a connected manifold $M$ is a smooth symmetric non-degenerate bilinear map $g:TM\times TM\to C^\infty(M)$, which can be seen as a section of $TM^*\times TM^*$ satisfying additional properties. From this point of view, $g(p)$ is a map between vector spaces $TM_p\times TM_p\to\mathbb{R}$ with the properties described on the above paragraph, so the signature of $g(p)$ is also well defined.
I never saw and couldn't find a proof that the signature of the metric on $TM$ (not $TM_p$) is also well defined (i.e. can't change on connected components). I got to the following reasoning and want to know if it is correct.
Fix $p\in M$, and let $U\subset M$ be a coordinate neighborhood of $p$. There still are orthogonal frames $\{E_1,...,E_n\}$ on $TU$ (why?), with respect to which the matrix of the metric $g_{ij}=g(E_i,E_j)$ is diagonal. The signature of this matrix on $U$ must the same as $g_{ij}(p)$, because otherwise at least one of the diagonal entries of $g_{ij}$ would be vanish somewhere in $U$, which is not possible since $g$ is non-degenerate.
The signature must also be the same on the overlap with any other coordinate subset of $M$, so the only way to patch the whole manifold is preserving the signature of $g(p)$. Therefore, if we define the signature of g to be the signature of $g(p)$, it is well-defined.