Simple Word Counter example written in PHP