TITLE: Reference for counting points over finite fields
QUESTION [5 upvotes]: The following fact is extremely well known:

Fact. Let $Y$ be a geometrically irreducible variety (not necessarily smooth or proper) over a finite field $k$.
  Then there is a constant $B$, depending only on cohomological invariants of the base change of $Y$ to an algebraic closure of $k$, such that: if $l$ is any finite extension of $k$ satisfying $|l|>B$, then $Y(l)$ is non-empty.

Unfortunately, I can't find any simple reference for this well-known fact.  If $Y$ is projective (and possibly singular), then it follows from the Lang-Weil estimates.  If $Y$ is smooth and proper over $k$, then it follows from Deligne's proof of the Weil conjectures.  Given that we don't mind replacing $Y$ with an open subvariety, there's a plausible argument for reducing the general case to one of these cases.
Also, the phrase "depending only on cohomological invariants of..." is rather vague, especially when $Y$ might be non-proper and singular.  So maybe it's better to stick to more concrete statements, such as that $B$ should remain constant in certain types of families.
I would like to cite this fact without having to devote half a page to deducing it from something else.  So my question is simply:

What is a good reference for the fact stated above?

REPLY [3 votes]: If you know that your algebraic variety is given (or can easily be given, or some open subset can) by a bounded number of polynomials in a bounded number of variables of bounded degree, and you don't care about actual constancy of the Betti numbers, you can combine easily the trace formula expression of D. Petersen's answer with bounds for Betti numbers as in Katz ("Sums of Betti Numbers in Arbitrary Characteristic", Finite Fields and Their Applications 7, 29-44 (2001)).  
A convenient reference for the trace formula would be SGA 4 1/2, for instance.