We present a randomized algorithm that takes as input a prime number p, and an algebraic set (represented by a system of polynomials) over the finite field Fp, and counts approximately the number of Fp-rational points in the set. For a fixed number of variables, the algorithm runs in random polynomial time with parallel complexity
polylogarithmic in the input parameters (number of input polynomials, their maximum degree, and the prime p), using a polynomial number of processors. However, the degree of the polynomial bound on the running time grows sharply
with the number of variables. A combinatorial analysis of the algorithm also shows that, when p is sufficiently large, a good approximate count is represented by Np
D
, where D is the highest possible dimension of an Fp-irreducible subvariety of the input defined over Fp, and N is the number of such distinct subvarieties. In addition, the algorithm computes these two numbers efficiently. It is also
applied to obtain an asymptotic lower bound counting result in the case when an algebraic set defined over ℚ is reduced mod
p, where p goes to infinity.