Allocating n processes to n servers, counting from the server perspective
The heuristic is: "try both ways, and see which works".  As you get more practice you might start to develop a sixth sense about which one to try first, but that's the most useful principle I can suggest.

The general mathematical principle is the bijection principle.  If you have two finite sets $S,T$ and you can find a bijection between $S$ and $T$, then they must have the same size.  So, if you can count the number of elements in either of them, you can infer the number of elements in the other one.