modification to project1, using list.count()