Word count and single application

Introduced a very simple word count.
Also manage the multiple openning of the file.