#Given two strings, find the number of common characters between them.

#Example

#For s1 = "aabcc" and s2 = "adcaa", the output should be
#commonCharacterCount(s1, s2) = 3.

#Strings have 3 common characters - 2 "a"s and 1 "c".

def commonCharacterCount(s1, s2):
	
	dics1 = {}

	for letter in s1:
		# If the letter is already in the dictionary
		if letter in dics1:
			dics1[letter] = dics1[letter] + 1
		else: 
			dics1[letter] = 1

	#print (dics1)
	dics2 = {}
	for letter in s2:
		# If the letter is already in the dictionary
		if letter in dics2:
			dics2[letter] = dics2[letter] + 1
		else: 
			dics2[letter] = 1

	#Now check if there are letters in both dictionaries and return the minimum value
	suma = 0
	for letter in dics1:
		if letter in dics2:
			suma = suma + min( dics1[letter],dics2[letter] )

	return suma
