Counting irreducible polynomials