Partition functions for supersymmetric black holes