input: from typing import List
  
  
  def num_common_substrings(s1: str, s2: str) -> int:
      """ Takes in two strings and returns an integer indicating the number of common 
      substrings between the two strings.
      >>> num_common_substrings("abcd", "bae")
      2
      """
output:     
      count = 0
      for i in range(len(s1)):
          for j in range(i + 1, len(s1) + 1):
              if s1[i:j] in s2:
                  count += 1
      return count
  