TITLE: Sets of $\mathbb{F}_p$-points of closed subvarieties of $\mathbb{A}^n$
QUESTION [6 upvotes]: Let $p$ be a prime and let $n\geq 2$ be an integer.
The set $\mathbb{A}^n(\mathbb{F}_p)$ has $p^n$ elements so it has $2^{p^n}$ subsets. How many of those subsets are of the form $V(\mathbb{F}_p)$ with $V\subset \mathbb{A}^n$ a closed geometrically irreducible subvariety?

REPLY [13 votes]: All of them. One can even take $V$ to be a smooth hypersurface whose extension to projective space is smooth, by Poonen's Bertini theorem. This guarantees irreducibility.
Poonen's Bertini theorem states that there exists a smooth hypersurface in $\mathbb P^n$ of degree $d$ for all $d$ sufficiently large satisfying any finite number of local conditions at closed points, as long as those local conditions don't manifestly force singularities at those points.
For each point in $\mathbb A^n(\mathbb F_p)$, both the condition that it lie in $V$ and that it not lie in $V$ are local conditions of just the sort considered by Poonen, and neither one forces smoothness.