In this note we address the question whether for a given prime number p, the zeta-function of a number field always determines the p-part of its class number. The answer is known to be no for p = 2. Using torsion points on elliptic curves we give for each odd prime p an explicit family of pairs of non-isomorphic number fields of degree 2p + 2 which have the same zeta-function and which satisfy a necessary condition for the fields to have distinct p-class numbers. By computing class numbers of fields in this family for p = 3 we find examples of fields with the same zeta-function whose class numbers differ by a factor 3.