val list = List(1,2,4,2,4,7,3,2,4)
I want to implement it like this: list.count(2) (returns 3).
list.count(2)