The orange circles below are points where you can cast a summon, but it can not spawn there. In stead, it will spawn at a near "valid" point.
The blue circle is just a regular point, nothing special about it.
To the rack, for some reason, there's a difference. If I'd cast a Decoy at blue, the rack will tick 1X, but if I'd cast a Decoy at orange, the rack will tick 1Y. For this particular rack, this means it changes from a Maul to a Throwing Axe, or from a Maul to a Military Pick.
As for the Hydra, since it spawns three separate "entities" or whatever, it will tick the rack three times.
If I would have casted the Hydra at blue, the rack would've ticked 3X, but since I casted in the corner, two of the heads were pushed from "invalid" to "valid" spawn points, which ticked the rack for 2Y. One head was able to spawn where it was "meant to spawn", so 1X from that one.
And for example casting a Golem at the spot where your current Golem is, will tick the rack for 1Y, and not 1X. This probably counts for all summons, except for..
Hydra seems to be an exception to this, I suppose because they have no collision.
Edit: Forgot to mention that you yourself are of course also an entity with a collision, meaning casting a Golem or whatever on your own location will tick the rack 1Y.
Note that the order does not matter: 1Y + 1X is the same as 1X + 1Y. While this limits possibilities, it does tell us a little bit more about what's going on.
This can open up quite a few extra possibilities, depending on your class/skills.
Below's a list of skills that I've tested that will tick racks. Blade Sentinel always ticks the rack 1Y for whatever reason, perhaps because it spawns on your own location.
Bone Wall specifically is awkward because it spawns between 5, 7 or 9 segments depending on slvl and, I guess because of how their spawns are handled, it's not very reliable from my experience.
I haven't tested summons that require a corpse
decoy
valkyrie
clay golem
blood golem
iron golem
fire golem
bone wall (each segment)
hydra (each head)
blade sentinel (always invalid)
shadow master
shadow warrior
traps from assassin
traps from shadow warrior / master
all druid summons