list.count function

Count the number of elements that satisfy given condition