Count words from a text and get data in a .csv file