you can avoid loops here:

counts = len(self.get_annual_occurrence_rates()) * len(self.nodal_plana_distribution.data) * len(self.hypocenter_distribution.data)