Simple Word Counter example written in C++