from typing import Iterable
from typing import Callable


def quantify(it: Iterable, pred: Callable = bool) -> int:
    """
    Count how many times the predicate is true

    >>> quantify([[], (), None, 0, 1, -1, 'fsdfds', ''])
    3
    """
    return sum(map(pred, it))