I´m doing a project on Text Mining, and therefore I want to write a small function counting the number of distinct tokens within a text. The Tokenization is done by the function