Pathfinders will create their total gems based on how many of the same troop type you have and then the Astral Spire will add +1 coloured gem at the end on top of that. For example, your team combination creates a total of 12 red gems and if you have the gold node unlocked, you will get an additional +1 gem for a total of 13 red gems.
Yes, skulls count as well. Any heroic gem including skulls count as a gem. Therefore this would affect troops like Stellarix most powerfully as it would cause Stellarix to loop very often.
Here’s a screenshot and video showing this in action: