Write a function to solve a variation of the Two Sum problem using HashMaps.
Given an integer list nums and integer target, return the number of ordered pairs of distinct indices (i, j) where nums[i] + nums[j] == target. Both (i, j) and (j, i) count separately. Return 0 when no pair exists.
Signature: count_two_sum_pairs(nums, target)
Example: nums = [-2, 5, 7, 1], target = 5 returns 2, representing (0, 2) and (2, 0). Use a hash map for an O(n) solution.
Constraints: 2 <= len(nums) <= 10^4; values range from -10^9 to 10^9.
def count_two_sum_pairs(nums, target):