Count number of occurrences in array python. Count all that satisfy a condition in Python.