Python solution for problem 1

Uses list comprehension and the handy-dandy count() method