Text this: Prime valued polynomials and class numbers of quadratic fields