We present a trace formula for an index over the spectrum of four dimensional superconformal field theories on \(S^3 \times \) time. Our index receives contributions from states invariant under at least one supercharge and captures all information -- that may be obtained purely from group theory -- about protected short representations in 4 dimensional superconformal field theories. In the case of the \(\mathcal{N}=4\) theory our index is a function of four continuous variables. We compute it at weak coupling using gauge theory and at strong coupling by summing over the spectrum of free massless particles in \(AdS_5\times S^5\) and find perfect agreement at large \(N\) and small charges. Our index does not reproduce the entropy of supersymmetric black holes in \(AdS_5\), but this is not a contradiction, as it differs qualitatively from the partition function over supersymmetric states of the \({\cal N}=4\) theory. We note that entropy for some small supersymmetric \(AdS_5\) black holes may be reproduced via a D-brane counting involving giant gravitons. For big black holes we find a qualitative (but not exact) agreement with the naive counting of BPS states in the free Yang Mills theory. In this paper we also evaluate and study the partition function over the chiral ring in the \(\mathcal{N}=4\) Yang Mills theory.