We view DHR superselection sectors with finite statistics as Quantum Field Theory analogs of elliptic operators where KMS functionals play the role of the trace composed with the heat kernel regularization. We extend our local holomorphic dimension formula and prove an analogue of the index theorem in the Quantum Field Theory context. The analytic index is the Jones index, more precisely the minimal dimension, and, on a 4-dimensional spacetime, the DHR theorem gives the integrality of the index. We introduce the notion of holomorphic dimension; the geometric dimension is then defined as the part of the holomorphic dimension which is symmetric under charge conjugation. We apply the AHKT theory of chemical potential and we extend it to the low dimensional case, by using conformal field theory. Concerning Quantum Field Theory on curved spacetime, the geometry of the manifold enters in the expression for the dimension. If a quantum black hole is described by a spacetime with bifurcate Killing horizon and sectors are localizable on the horizon, the logarithm of the holomorphic dimension is proportional to the incremental free energy, due to the addition of the charge, and to the inverse temperature, hence to the surface gravity in the Hartle-Hawking KMS state. For this analysis we consider a conformal net obtained by restricting the field to the horizon ("holography"). Compared with our previous work on Rindler spacetime, this result differs inasmuch as it concerns true black hole spacetimes, like the Schwarzschild-Kruskal manifold, and pertains to the entropy of the black hole itself, rather than of the outside system. An outlook concerns a possible relation with supersymmetry and noncommutative geometry.