added write_ngrams_count method and wrote a script to create all the ngrams for the training data