Number of points on schemes modulo $p^k$ Let $X$ be a finite type scheme over $\mathbb{Z}_p$ for some prime $p$. Assume that $X_{\mathbb{Q}_p}$ is smooth of dimension $n$, but not necessarily irreducible. Then is
$$X(\mathbb{Z}/p^k\mathbb{Z}) = O(p^{kn})$$
as $k \to \infty?$
 A: Yes, this is true, for elementary reasons (i.e. not to do with the Igusa zeta function or something).
By passing to an open cover, we may assume $X$ is affine, say $X = \operatorname{Spec} \mathbb Z_p[x_1,\dots, x_N]/ (f_1,\dots, f_m)$. The Jacobian of this system of equations is an $N \times m$ matrix.
Consider for each $x \in X(\mathbb Z/p^k)$ the minimum $p$-adic valuation of the determinant of an $N-n \times N-n$ submatrix of this Jacobian, considering the $p$-adic valuation of $0$ in $\mathbb Z/p^k$ to be $k$. I claim this is bounded by some constant $c$. If not, we can choose a sequence where this increases to $\infty$ (necessarily with increasing $k$) and then a subsequence which converges $p$-adically, which must converge to a singular point of $X$.
So we may assume that one of these determinants has $p$-adic valuation at most $c$. Summing over the finitely many possible choices, it suffices to bound the number of points assuming a particular determinant divides $p^c$. We may as well throw away all the equations not involved in our fixed submatrix. We will show that, setting all variables not involved in this submatrix to specific values, the number of solutions is $O(1)$. This suffices as the number of ways to assign the other variables is $p^{kn}$.
To do this, consider two solutions $x_1,\dots, x_{N-n}$ and $y_1,\dots, y_{N-n}$. Let $\ell$ be the minimum $p$-adic valuation of $x_j-y_j$. We have $f_i (x_1,\dots, x_{N-n}) = 0= f_i (y_1,\dots, y_{N-n}) = f_{i} (x_1,\dots, x_{N-n}) + \sum_j \frac{\partial f_i}{\partial x_j} (y_j-x_j) + O \max_j ( y_j -x_j )^2$. Since the determinant divides $p^c$, for some $i$ the middle term divides $p^{\ell+c}$. So we must either have $\ell +c \geq k$ or we have the middle term cancelled by the following term, meaning $\ell +c \geq 2\ell$, i.e. $\ell \leq c$. So $\ell$ is either in $[0,c]$ or in $[k-c k]$.
This means that, if $x_1,\dots, x_{N-n}$ and $y_1, \dots, y_{N-n}$ are congruent modulo $p^{c+1}$, they are congruent modulo $p^{k-c}$. So the number of solutions in each congruence class modulo $p^{c+1}$ is at most $p^{(N-n)c}$, and thus the total number of solutions is at most $p^{2 (N-n)c}$. This is $O(1)$, and we're done.
