Let $\mathcal X$ be a scheme of finite type over $\mathbb Z$. We know that the number of geometrically irreducible components (of geometric fibers) is the constant at almost everywhere, by EGA. It is not true for the number of irreducible components. For example $\mathbb Z[x]/(x^2+1)$ is split and nonsplit for infinitely many primes.
However, is it true that the number of irreducible components of $\mathcal X_{\mathbb F_p}$ is the same as $\mathcal X_{\mathbb Q_p}$ for almost all $p$? For this example, factorizing mod $p$ is the same as factorizing over $\mathbb Q_p$ for almost all prime (excluding the bad primes) due to Hensel's lemma. What about higher dimensional case?