input: Write a python function to determine the number of elements in an array whose modular inverse under a given prime number p is equal to the element itself.
  assert modular_inverse_count([ 1, 6, 4, 5 ], 4, 7) == 2
  assert modular_inverse_count([1, 3, 8, 12, 12], 5, 13) == 3
  assert modular_inverse_count([2, 3, 4, 5], 4, 6) == 1
output: def modular_inverse_count(arr, n, p):
      def mod_inverse(x, p):
          return pow(x, p - 2, p)
      
      count = 0
      for num in arr:
          if mod_inverse(num, p) == num % p:
              count += 1
      return count