I notice some custom items like zombie virus or spider heads don't stack, but sometimes zombie virus will drop as a 2 item stack, and yet skeleton heads and other heads stack. Not sure what the reasoning is for this or if this is only a me problem. o v o
Certain heads are already in Vanilla Minecraft, so they stack. However some, such as Ghast heads for instance, are just player heads that are renamed and have a Ghast skin on them, and are coded to occasionally drop from a Ghast kill. However there's a strange bug, if you kill a Ghast this week, and kill one a few days/week(s) later, they won't stack with each other. Not sure what the reasoning behind it is but it's very, very annoying. Occasionally when you kill let's say a momentus and you get a ton of zombie virus they'll stack together, but in general they won't, and once you un-stack them you can't stack them again. Hope this helps
Apart from what Petezz said: basically any custom item will stack as long as it's vanilla counterpart also stacks and... if it hasn't been used yet. If it doesn't stack in vanilla (like potions and cake) then it also won't stack on EMC, with the main exception when it drops or when you find it (like the feast for a king festival chests).