Let's say we fight a dretch worth 600 XP. That dretch summons 2 more dretches, each usually also worth 600 XP. If we defeat all three dretches, would we get 600 XP or 1800 XP?
Typically, every creature fought gives experience. However, certain effects (especially summoning) can be exceptions. In general, experience is not awarded because a creature used its abilities.
If Goblin A called for help and two more goblins came, those goblins award full exp. If Goblin A used an alchemical item to attract a pair of wolves in the area to attack the party, the wolves award full exp. If Goblin A's mounted on a goblin dog, the goblin dog gives full exp (usually...).
If Goblin A used a special quality to make two duplicates of himself, those duplicates do not award exp. If Goblin A cast summon nature's ally to summon a wolf, that wolf would not award exp. If Goblin A fights alongside (or astride) his goblin dog Animal Companion, Mount, or Familiar, the goblin dog would not award exp.
Note that in the cases where the creatures don't award exp, the goblin himself probably gives more exp than in the previous examples. He's got a weird template applied, or levels in a class with spellcasting or an animal companion rather than being a "Small humanoid (goblin) warrior 1" or whatever the Bestiary lists a for a generic gobbo.
TL;DR: If Creature B only exists because of Creature A's ability, Creature B is already included in Creature A's experience award.
The GMG has a bit near the XP table that explains summoned creatures don't count as they are already included in the CR. There's an example that if the caster had used a fireball instead of summoning it wouldn't change CR.