[Edit] Let me make question more focused. It is about details of Weil conjectures.
Rationality of zeta function does NOT require the manifold to be smooth & projective, so zeta function is a factor of some polynomials:
$ \frac{P_1(T)\dotsb P_{2n-1}(T)}{P_0(T)\dotsb P_{2n}(T)}, $
Question What happens if manifold is not required to be smooth and projective, is there some cohomology theory which gives / bounds DEGREES of those polynomials in zeta function ?
Can some version of intersection cohomology appear in singular case ? At least for small resolutions ?
If manifold is affine and smooth - is it enough to consider l-adic cohomologies with compact support ? (Seems - YES by Ben's answer: Grothendieck trace formula )
PS:
If manifold is SMOOTH and PROJECTIVE, then as far as I understand degrees of those polynomials equals to dimensions of l-adic cohomologies (which in the case of GOOD REDUCTION coincide with dim $H^i$ over complex numbers (Betti numbers)).
OLD version of question:
Weil conjectures are "highly influential proposals by André Weil (1949) on the generating functions (known as local zeta-functions) derived from counting the number of points on algebraic varieties over finite fields". See nice brief surveys on Wikipedia or Tao2014.
Conjectures consist of several statements:
Rationality of zeta-function
Functional equation and Poincaré duality for the zeta function
Riemann hypothesis
(Betti numbers) If X is a (good) "reduction mod p" of a non-singular projective variety Y defined over a number field embedded in the field of complex numbers, then the degree of Pi is the ith Betti number of the space of complex points of Y.
Item 2 clearly needs that variety to be smooth and projective. While items 1,3 holds for any quasi-projective (e.g. affine) manifold (see Tao2014).
Question: What about the last item of the conjectures for affine (or quasi-projective) manifolds (not necessarily smooth) - is there any cohomological interpretation of degrees of polynomials P_i (which represent the zeta function) ?
For example. Consider the commuting variety: pairs of matrices which commute or pairs/triples/n-tuples of non-degenerate matrices which commute. Number of points over finite field is known (at least for pairs) see e.g. MO271752.
Question 2: What about particular cases of such manifolds ?