def commonCount(stringA, stringB):
    listB = list(stringB)
                                # template for "accumulation"
    count = 0                   # initialize the result
    for char in stringA:        # loop
        if char in listB:       # filter (optional)
            count = count + 1   # accumulate total value
            listB.remove(charA)
    return count
