We give an exact formula (in terms of class numbers of certain number fields) for the number of principally-polarized abelian varieties in certain isogeny classes of abelian varieties over finite fields. Using this formula and the Brauer-Siegel theorem, we provide a heuristic interpretation of the limiting distribution of Frobenius eigenvalues that was recently proven by Katz and Sarnak.