input: Write a function to find the total number of common characters present in both strings.
  
  assert num_common_chars("hello", "world")==3
  assert num_common_chars("abc", "def")==0
  assert num_common_chars("aaa", "a")==1
  assert num_common_chars("", "test")==0
  assert num_common_chars("test", "")==0
output: def num_common_chars(s1, s2):
      return sum(min(s1.count(char), s2.count(char)) for char in set(s1))