>>> j = [4, 5, 6, 7, 1, 3, 7, 5] >>> len([1 for i in j if i > 5]) # OR >>> sum(1 for i in j if i > 5)