def get_max_count(l, num):
    count = 0
for x in l:
    if x > num:
        count += 1
return count
l = [1.1, 2, 3.1, 4, 5, 6, 7.2, 8.5, 9.1]
print(get_max_count(l=l, num=7))
How can I count occurrences of elements that are bigger than a given number in an list?