Number of solutions to polynomial congruences Suppose I have $R$ homogeneous polynomials $F_1, ..., F_R$ with integer coefficients. Let $V$ be the affine variety defined by these polynomials over $\mathbb{C}$. I was wondering if some bound that looks like the following was known?
$$
\#\{ \mathbf{x} \in (\mathbb{Z}/q \mathbb{Z})^n: F_{i}(\mathbf{x}) \equiv 0 (\text{mod }q) \text{  for each } 1 \leq i \leq R \} \leq C q^{\dim V + \delta}  
$$ 
for some $\delta > 0$. Here $C>0$ is independent of $q$. Of course if $\delta = n - dim V$ then it's trivial so I was hoping for something smaller. I would greatly appreciate any comments on this. Thank you very much. 
 A: First note that you can't do better than the trivial bound $q^n$ in general; for example if $q$ divides all the coefficients of the $F_i$.
However this silly problem only occurs for finitely many primes (by the Chinese remainder theorem we can reduce to the case of prime powers). So let $p$ be a prime such that $V_{\mathbb{F}_p}$ has dimension $d:=\dim V$ (here I denote by $V_{\mathbb{F}_p}$ the reduction of $V$ modulo $p$). By Noether normalisation there exists a finite map
$$f: V_{\mathbb{F}_p} \to \mathbb{A}^d_{\mathbb{F}_p}.$$
Let $C$ be the degree of $f$. Then we have
$$\#V(\mathbb{F}_p) \leq C\#\mathbb{A}(\mathbb{F}_p) = Cp^{d}.$$
This is much easier and weaker than the Lang-Weil estimates, which are much deeper and require the Riemann hypothesis for curves.
To treat prime powers, there are some subtleties. One needs to understand the cardinalities of the fibres of the map
$$\#V(\mathbb{Z}/p^k\mathbb{Z}) \to \#V(\mathbb{F}_p) \quad (*).$$
If $V_{\mathbb{F}_p}$ is smooth, then a version of Hensel's lemma states that the fibres of the map $(*)$ all have cardinality exactly $p^{d(k-1)}$. This gives the upper bound
$$\#V(\mathbb{Z}/p^k\mathbb{Z}) \leq Cp^{kd}.$$
By "spreading out arguments" (essentially applying Noether Normalistion to the variety over $\mathbb{Q}$ then spreading out the map), one finds  an absolute constant $C$ such that
$$
\#\{ \mathbf{x} \in (\mathbb{Z}/q \mathbb{Z})^n: F_{i}(\mathbf{x}) \equiv 0 (\text{mod }q) \text{  for each } 1 \leq i \leq R \} \leq C^{\omega(q)} q^{\dim V}  
$$ 
holds for those $q$ which satisfy the above conditions on the dimension of $V \bmod q$ and smooth reduction. Here $\omega(q)$ denotes the number of prime divisors of $q$.
A: The magic words are Lang-Weil (actually, the upper bound is easy, it is the lower bound that occupies most of Lang and Weil's paper
Lang, Serge; Weil, André, Number of points of varieties in finite fields, Am. J. Math. 76, 819-827 (1954). ZBL0058.27202.
The result is for prime moduli, for composite moduli you can use chinese remaindering. For more on this, see Terry Tao's blog post.
A: The case of $q$ a prime being answered by Igor, let us assume that $q=p^k$ is a power of a prime $p$. In this case there is the following result of Serre, which gives a very partial answer:
Let $d_p$ be the dimension of the $p$-adic analytic space $V$ defined in $\mathbb Z_p^R$ by the equations $F_1=\dots=F_r=0$. Then
$$
\#\{ \mathbf{x} \in (\mathbb{Z}/q \mathbb{Z})^n: F_{i}(\mathbf{x}) \equiv 0 (\text{mod }q) \text{  for each } 1 \leq i \leq R \} \leq C_p q^{d_p}  
$$ 
where $C_p$ is some constant depending on $p$ but not on $k$.
The result is Serre's Théorème 8 in his IHES paper on Chebotarev.
Comparing to what you ask, there are two differences: the exponent is $d_p$ instead of $\dim_{\mathbb C} V$ (but they are the same for almost all $p$, aren't they?). And the constant $C$ depends on $p$, though it is the same for all powers $q$ of a given $p$. 
