def countit(objs):
    """Return a dict with counts for each item in a list."""
    out = {}
    for el in objs:
        out[el] = 1 + out.get(el, 0)
    out = {k: v for k, v in out.items()}
    return out