added tests for count_ngrams