def bi_counts(bis):
    """
    gets the number of occurances of all bigrams in sequence

    Arguments
    bis : sequence of alphabet members 

    Returns
    dict of (a,b):count

    """
    ts={}
    for i in range(1,len(bis)):
        a,b=bis[i-1],bis[i]
        ts[(a,b)]=ts.get((a,b),0)+1
    return ts