For curves, the $\mathbb Z$ points (equivalently the $\mathbb Q$ points) are finite if the genus (in the topological sense) of the complex riemann surface is at least $2$. This is Mordell's conjecture, aka Falting's theorem. In the genus $0$ case, the rational points are either empty or infinitely many. In the genus $1$ case the rational points form a finitely generated abelian group with possibly $0$ rank. This is Mordell-Weil. This also works for affine curves (and with any number ring instead of the integers) - the rational points are finite if the Euler characteristic is negative (aka hyperbolic geometry). I think you also want your model to be flat to get good behavior (this is automatic in dimension one).