TITLE: Counting irreducible polynomials over finite fields
QUESTION [5 upvotes]: How many irreducible polynomials in $Z_2[x]$ of degree $3$? 
I have discussed this with my friend before and we found that $x^3 + x^2 + 1$ and $x^3+x+1$ are the two said polynomials which irreducible. We got this the approachment that polynomials $p(x) = ax^3+bx^2+cx+d$ must satisfy $a\ne 0$ and later $d \neq 0$ and here we only need to take some cases of the value of $b$ and $c$. 
Do you have idea to solve this problem clearly without guessing? 
I am afraid that there will be a new problem asking for polynomials whose degree is higher than this one and here I will be stuck.

REPLY [3 votes]: Up to isomorphism there is only one field with $8$ elements.
If $f(x)$ has degree $3$ and is irreducible, take an extension field $F$ of $\mathbb{Z}_2$ where $f$ has a root. By the statement above, all roots of $f$ belong to $F$. By the dimension formula, $F$ cannot contain elements of degree $2$ over $\mathbb{Z}_2$. Thus there are exactly two (monic) irreducible polynomials of degree $3$, because the set $F\setminus\mathbb{Z}_2$ has six elements and fixing one of them identifies the other two roots of its minimal polynomial.
For similar reasons, there is only one irreducible polynomial of degree $2$.
For the degree $4$ it's a bit more complicated, but we can partition the $16$ element field into two elements of degree $1$, two elements of degree $2$, and $12$ elements of degree $4$. Thus the irreducible polynomials of degree $4$ are three.
Degree $5$ is simple again (because $5$ is prime): the number of irreducible polynomials is
$$
\frac{2^5-2}{5}=6
$$