<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _total_counts(seqs, seqL, aligned=False):
 """ Counts total seqs after each step """

    total = Counter()
    if isinstance(seqs, list):
        if not aligned:
            l = len([total.update(seqL[s].freq) for s in seqs])
        else:
            l = len([total.update(seqL[s].freq) for s in seqs if seqL[s].align > 0])
    elif isinstance(seqs, dict):
        [total.update(seqs[s].get_freq(seqL)) for s in seqs]
        l = sum(len(seqs[s].idmembers) for s in seqs)
    return total, l