def num_disambiguated_iupac_strings(seq, ambiguous_letters, disambiguation):
    """
    seq is Bio.Seq.Seq or str

    ambiguous_letters is string containing ambiguous IUPAC codes

    disambiguation is dict with key from ambiguous_letters and values the
    strings containing the unambiguous versions (e.g.,
    Bio.Data.IUPACData.ambiguous_dna_values)
    """
    n = 1
    for letter in str(seq):
        if letter in ambiguous_letters:
            n *= len(disambiguation[letter])
    return n