another way to put this is: if G is abelian, then Z(G) = G (which isn't very interesting). i believe the hint Swlabr is trying to steer you to is the class equation:
$|G| = |Z(G)| + \sum_{a \not\in Z(G)} [G:N(a)]$ where N(a) is the normalizer (or, in some texts, the centralizer) of the element a.
note each index [G:N(a)] must divide 8, and since we have the elements of Z(G) in the first term, and the a's are NOT in the center, each [G:N(a)] has to be either 2, or 4 (the only conjugacy classes of size 1 are elements of the center). in any case, each [G:N(a)] is an even number. is there an integer solution to: