Cache QuerySet count when iterating or slicing.