input: Write a python function to count the number of palindrome substrings in a given string.
  assert count_palindrome_substrings("aaa") == 6
  assert count_palindrome_substrings("abc") == 3
  assert count_palindrome_substrings("racecar") == 10
output: def count_palindrome_substrings(s: str) -> int:
      def is_palindrome(sub: str) -> bool:
          return sub == sub[::-1]
  
      n = len(s)
      count = 0
  
      for i in range(n):
          for j in range(i, n):
              if is_palindrome(s[i:j + 1]):
                  count += 1
  
      return count