from typing import Iterable


def _not_none_count(sequence: Iterable) -> int:
    """
    A helper function for counting the number of non-`None` entries in a sequence.

    :param sequence: the sequence to look through.
    :return: the number of values in the sequence that are not `None`.
    """
    return sum(1 for _ in filter(lambda item: item is not None, sequence))