We calculate the E-polynomials of certain twisted GL(n,C)-character varieties M_n of Riemann surfaces by counting points over finite fields using the character table of the finite group of Lie-type GL(n,F_q) and a theorem proved in the appendix by N. Katz. We deduce from this calculation several geometric results, for example, the value of the topological Euler characteristic of the associated PGL(n,C)-character variety. The calculation also leads to several conjectures about the cohomology of M_n: an explicit conjecture for its mixed Hodge polynomial; a conjectured curious Hard Lefschetz theorem and a conjecture relating the pure part to absolutely indecomposable representations of a certain quiver. We prove these conjectures for n = 2.