Lab 5, Objective 1: counting Uppercase and lowercase words
improved version of upper and lowercase word counter