hw4 part 3 (Count) done