Hypothesis H and the prime number theorem for automorphic representations