input: Write a function to find the total number of common characters present in both strings. Both strings should be provided as parameters. If either string is empty, then the function should return 0.
  assert num_common_chars("hello", "world")==2
  assert num_common_chars("house", "mouse")==4
  assert num_common_chars("silent", "listen")==6
  assert num_common_chars("", "apple")==0
  assert num_common_chars("abc", "")==0
output: def num_common_chars(s1, s2):
      if not s1 or not s2:
          return 0
      common_chars = set(s1) & set(s2)
      return sum(min(s1.count(char), s2.count(char)) for char in common_chars)