def count(typename, objects=None):
    if objects is None:
        objects = gc.get_objects()
    try:
        if '.' in typename:
            return sum(1 for o in objects if _long_typename(o) == typename)
        else:
            return sum(1 for o in objects if _short_typename(o) == typename)
    finally:
        del objects  # clear cyclic references to frame
Raise exception if review branch has invalid base.
dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/dep/objgraph.py/count--crossover with--dataset/ETHPy150Open bloomberg/phabricator-tools/py/abd/abdt_branch.py/Branch.verify_review_branch_base