HW9, passing only one var to method

count_punct is not very elegant, though it gets the job done. I tried
loops, some of which worked, but I couldn't get them to return the right
thing. I always ended up with three "end"s and couldn't get things to
increment. More knowledge needed.