Assume the prime factorization of $n$ is given as $$n = p_1^{e_1} \cdot p_2^{e_2} \cdot p_3^{e_3} ...p_k^{e_k}$$
How many unordered pairs of divisors does the number $n$ have such that the divisors themselves have the same number of divisors?
For example, $1000$ has 2 such pairs: $(8 , 125)$ , $(20 , 50)$ with 4 divisors for the first pair and 6 for the second.
The primes themselves don't matter obviously, but rather just the exponents. So I tried to visualize it this way: the primes are different coloured balls, and the exponents are how many balls we have of each. We have 2 boxes as well. Each time, we pick a prime, and select a portion of the number of balls, call it $f_i$. We put $f_i$ into 1 box, and the rest of the balls, $e_i - f_i$ , into the other. Once we've completed the process, we have created 2 divisors of $n$. For them to have the same number of divisors, the following must hold:
$$\prod _{i=0}^k (f_i +1)= \prod_{i = 0}^k(e_i - f_i + 1)$$
It seems to me this can be solved with combinatorics, but I am unable to formulate the above visualization into this. Any insight on a general approach would be great, as well as an explanation of an algorithm you think would work!