Let $X,Y$ be two schemes finite type over $\Bbb Z$, assume $\#X(A)=\#Y(A)$ for every finite commutative ring $A$, then
- must these two schemes be isomorphic ?
- What invariants of schemes coincide on $X,Y$ (dimension, cohomology and so on)?
- If one is smooth, must the other one be?
- Is the condition above equivalent to $\#X(A)=\#Y(A)$ for all but finitely many finite commutative ring $A$?
The motivation for this problem is from Weil conjecture or Igusa zeta-function, which either count points over finite fields or quotient rings like $\Bbb Z/p^n\Bbb Z$ to get the information of underlying scheme.
Firstly, as every finite ring is Artinian we can only consider finite local rings. If $X$ is a equidimensional smooth scheme finite type over $\Bbb Z$, then by criterion of formally etaleness we know that $\#X(A)=\#X(A/I)(\#I)^{\text {dim} X}$ for every ring $A$ with square-zero ideal $I$ i.e $I^2=0$ if both sides are finite. (Working locally, we can assume $X \overset{\text{etale}}\rightarrow \Bbb A_\Bbb Z ^{\text {dim} X} \rightarrow \text{Spec} \Bbb Z$, then $X(A)=X(A/I)\times_{\Bbb A_\Bbb Z ^{\text {dim} X}(A/I)} \Bbb A_\Bbb Z ^{\text {dim} X}(A)$ as sets and $\Bbb A_\Bbb Z ^{\text {dim} X}(A) \rightarrow \Bbb A_\Bbb Z ^{\text {dim} X}(A/I)$ is surjective with each fiber has $(\#I)^{\text {dim} X}$ elements).
Hence in above case we have $\#X(A)=\#X(A/m)\prod_{i=1}^{\infty}(\#m^i/m^{i+1})^{\text {dim}X}$ for any finite local ring $(A,m)$, so knowing information over finite fields is enough to decide information over every finite rings in the smooth case. So for equidimensional smooth proper schemes over $\text{Spec} \Bbb Z$ , the condition is equivalent to their Hasse-Weil function equal.
Secondly, two elliptic curves over $\Bbb F_q$ have same zeta-function if and only if they are isogenous. So two isogenous non-isomorphic elliptic curves over $Spec \Bbb Z$ may serve as a counter example, but there is no elliptic curves over $\Bbb Q$ with good reduction everywhere. (Probably the same holds for abelian varieties). In some sense, smooth proper schemes over $\text{Spec} \Bbb Z$ are rare (those connected etale ones are trivial by Minkowski's theorem), so I think we need to consider singular ones in general.
On the other hand, as in Classification of finite commutative rings shows finite rings are rich, we already have lots of finite rings like $\mathbb F_p[x,y] / \langle x^2, xy, y^2\rangle$. Furthermore, there is an estimate for the number of commutative rings of order $≤N$. It is
$exp[\frac{2}{27} \frac{log(N)^3}{(log 2)^2} \; +O(log(N)^{\frac {8}{3}})] \quad for N\to \infty$
by Bjorn Poonen, and many related interesting theorems is in the article
So in the non-smooth case the condition over finite rings may not be totally determined by finite fields, there may be new phenomenons. This recent article explains some relationships of rational singularity and growth of $\#X(\Bbb Z/p^n\Bbb Z)$.
At last, are there some examples of computation of $\Bbb \#X(A)$ in the non-smooth case? I worked out some cases for $X=\text{Spec} \Bbb Z[x,y]/(y^2-x^3)$ but not completely.
Edit: I am mostly interested in the case $X$ is proper or $X \rightarrow \text{Spec} \Bbb Z$ is surjective, as there are counterexamples using isogenous elliptic curves for the first problem in below's comments. The title contains the words "commutative" because we can also define points over finite rings in general (like $M_n(\Bbb F_q)$) for $X$ finite type over $\Bbb Z$ and ask the same question, which I have no idea to deal with even in the smooth case at present.