import counter to count frequency of n-grams