def getCounts(matches):
    counts = collections.defaultdict(int)
    for seq, pos in matches:
        for motif, strand, start, end in pos:
            counts[motif] += 1
    return counts
count numbers of motifs.
dataset/ETHPy150Open CGATOxford/cgat/CGAT/Motifs.py/getCounts