I had a version of that ready to post, and then my internet broke temporarily. Grr.
Your version's better, so it's probably for the best, but still... grr.
Edit: I got thinking about it for a bit, and I believe that if a number splits into prime factors of the form a^b*c^d*e^f*..., then it will have in total (b+1)*(d+1)*(f+1)*... factors. As each of these factors has a partner that it can multiply with to produce the original, then you would just divide the result of the above formula by 2 to find the number of arrangements. The exception to this is when the original number is a square, because then one of its factors would group with itself to produce the original. Luckily, square numbers, and only square numbers, produce an odd number of factors, so when you try to find the amount of arrangements using the above method you will get a remainder and so when this happens you will know to just round up.
Disclaimer: All of that stuff was just from me thinking and I didn't actually calculate anything, so I can't vouch for its accuracy. I think its right though.