'The number of HostQueueEntries for this job in the Pending state.'

def _pending_count(self):

    pending_entries = models.HostQueueEntry.objects.filter(job=self.id, status=models.HostQueueEntry.Status.PENDING)
    return pending_entries.count()
