Do zombie pigmen in the nether, adjacent to a nether portal affect the spawn cap in the overworld?

Solution 1:

In singleplayer, the nether is not loaded by default, so any pigmen (or other mobs) that spawn in the overworld and wander through the portal don't move or count towards the mob count anymore, until you enter the nether. This is one way to get around the cap for naturally spawned mobs, storing the mobs in the nether until it is time to kill them.

This can lead to dangerous (for your computer/framerate) amounts of mobs in the area around the portal once you do enter the nether though, so if it is not part of your design, turn off your portal before afking. Doing so will also keep the pigmen from spawning in the overworld.