from typing import Counter


def count_ngrams(text, n):
    """
    :param text: text
    :param n: n of n-gram
    :return: Counter objects for n-grams in the text
    """
    ngrams = [text[i:i + n] for i in range(len(text) - n)]
    return Counter(ngrams)