input: Write a python function to count pairs in an array whose sum is equal to a given number.
  assert count_pairs([-2, 0, 4, 8 , 10], 8) == 1
  assert count_pairs([1, 5, 7, -1, 5], 6) == 3
  assert count_pairs([1, 1, 1, 1], 2) == 6
output: def count_pairs(arr, target_sum):
      count = 0
      freq = {}
      
      for num in arr:
          complement = target_sum - num
          if complement in freq:
              count += freq[complement]
          
          if num in freq:
              freq[num] += 1
          else:
              freq[num] = 1
      
      return count