Let $K:=\mathbb{C}$, and let $R:=K[x_1,\dots , x_n]$.

Then, a system of polynomial equations $p_1=0, p_2=0, \dots , p_r = 0$, where the $p_i$ are polynomials in the $x_j$, has finitely many solutions $\Leftrightarrow$ the Krull dimension of $R/I$ is equal to $0$, where $I:=\langle p_1, p_2, \dots , p_r \rangle$.

My question is:

Is this also true, if we replace $\mathbb{C}$ by $\mathbb{Z}$ ?

If not, is there a criterion which says sth. like

There are finitely many solutions in the $K=\mathbb{Z}$ case $\Leftrightarrow \dots$ ?

Thank you.