from typing import Counter


def count_terms(terms: list) -> dict:
    """
    Count the number of terms
    :param terms: term list
    :return dict_term: The dictionary containing terms and their numbers
    """
    entity_dict = dict(Counter(terms))
    print('There are %s entities in total.\n' % entity_dict.__len__())
    # print({key: value for key, value in entity_dict.items()})
    return entity_dict