Alright, so APL is your average party level, you add the group's levels together, then divide by how many characters are in the group and round to the nearest whole number. If there are six or more players in the group, add one to the APL. If the group contains three or less, subtract one from the APL. Our group's APL is 7, since there are four players of level seven and (7 x 4)/4 = 7. Huzzah maths! I have debated a bit on whether or not I should increase the APL by one because of the two cohorts, thrall, and Gob. Still gotta run some of the math and statistics on fights for that.
So as I think I've said before. A CR encounter equal to the APL of the group is an average fight, something that will use up a small amount of the party's resources but not cripple them. APL-1 is an easy encounter and something they should kind of cakewalk their way through, APL+1 is a challenging encounter, APL+2 is hard, and APL+3 is epic. Epic is probably something you only use for a main big bad enemy at the end of a campaign, APL+2 is what I use for the "main" fight/bad guy/whatever of a scenario. Once you figure out how hard you want the encounter to be, you look at a chart of CRs and experience points associated with that CR, then you basically buy enemies with that experience total. So a CR 8 fight worth 4800 experience points could fit one CR 8 enemy, three CR 5 enemies (each worth 1600 experience points), or like two CR 5 enemies and 4 arrow traps (CR 1 a piece and worth 400 experience points each). There are also a bunch of rules for designing traps and whatnot later in the core book as well.
There are some additional rules as well. I primarily use leveled enemies. Enemies with NPC classes (Adept, Aristocrat, Commoner, Expert, and Warrior) have a CR equal to their level -2. So a 5th level Warrior is a CR 3 enemy and worth 800 experience points and you could throw six of them into a CR 8 encounter. If they have PC class levels (Barbarian, Bard, Cleric, Fighter, etc), their CR is equal to their class level -1. So a 5th level Fighter is CR 4 and worth 1200 experience points and you could throw four of them into a CR 8 encounter. If the enemies/hazard/etc is on favorable terrain, like say a bunch of stealthy stalker types in a forest they've trained and hunted in from birth, you don't change the CR at all, but you do reward experience as if it were one CR higher. If you do something like encounter a water or ice elemental in the middle of a scorching lava flow or a flying creature in an subterranean room where it can't fly and use its special flying abilities, you do the opposite and reward experience points as if the encounter were one CR lower. Finally, you can modify an encounter based on the value of the gear a leveled enemy uses. Normally you use a table that breaks down gear value by level for NPCs, so a 5th level Warrior from above would have 2400 gp worth of gear, and a 5th level Fighter from above would have 3450 gp worth of gear. If you deprive them of gear, and it actually hampers them (a Monk with no weapons and armor is still pretty capable of being an obstacle, whereas a Fighter that is designed to use a mace, shield, and full plate is not), you reduce the enemy's CR by one. If you give them money to buy gear as if they were a PC (5th level Warriors/Fighters would then get 10500 gp worth of gear), you add 1 to their CR.
Ok, so that runs down pretty much the entire section on designing encounters from the core book. The reason I bring this up is because of the math behind CR and enemies with levels. Back during 2nd Edition I was running this campaign called Montalo. There were these extraplanar creatures called the Fey that once lived on this world called Montalo, but had to flee from the world because other races didn't like how powerful they were. So they ended up in this lightless realm of nothingness on a continent floating in a void. The Fey eventually figured out how to get back and wanted to take back their world from the other races living there. So the PCs were Fey trying to sneak about to work mayhem in preparation for the race's return to the world. There were two sides to this campaign and two groups of PCs. The other side of the campaign was a group of PCs attempting to figure out some odd events in the world which would lead them along the plot to the eventual goal of keeping the Fey from returning. So there were two groups of players and there was some overlap between the groups in terms of players. The final fight of the campaign was going to pit the two groups of players against one another with each player choosing which of their characters they wanted to control if they had one on both sides of the campaign.
Ok, so let's update this a bit to Pathfinder and say we have four PCs and players on each side of the table ready to determine the fate of this world with dice in hand and steel in their eyes. Let's say they're all 7th level characters and no one has any adjustment for templates or overpowered races and whatnot and I've distributed cash and gear evenly on both sides. Let's also say there is average party composition. There's no weird stuff like four Fighters facing off against four Wizards or four stealth geared characters that are useless unless they get the first shot fighting four boots of speed and eyes of the eagle wearing Dexterity based Fighters with high Perception. It's all even across the board.
Now, Group A has an APL of 7 (as does Group B, obviously). So an average encounter for them is CR 7, one worth 3200 experience points. Group B is all 7th level characters with PC classes, so each of them has a CR of 6, but they all have PC gear values, so they're back up to CR 7. So Group B is made of four CR 7 enemies, so they are worth 12800 experience points and are thus a CR 11 encounter. Which is Group A's APL +4, so beyond epic in difficulty. If there are observers to this fight, it will go down in history. Tales will be told and songs sung, whatever the outcome. To continue, APL+4 is something that should not only expend all of Group A's resources even from rested and at full strength, but possibly end in a TPK or near TPK, if they do manage to win. Obviously the same goes for Group B.
I don't dispute that, that kind of makes sense. If you are facing a foe or foes completely evenly matched with you, it is going to be a pretty damn difficult fight, and more than likely end up having a lot to do with dice rolls, because if everyone is evenly matched, the dice are the only random element in the fight. It is truly a battle that would be determined by our little, plastic, polyhedral gods and their bloodthirsty pips and cold, clattering laughter.
What I do dispute is the math that says both groups are completely outmatched by their opposition, but are somehow also able to outmatch their opposition. Group B is so powerful that Group A, if they survive, will do so by a hairsbreadth, but so will Group B because Group A is so much more powerful than Group B. There is a certain logic to that, as in a fight between two groups of supremely skilled and powerful combatants, whoever survives would do so by the barest margin, but if they're both evenly matched, wouldn't that mean that the fight is completely fair and balanced? I'm not saying the APL calculations are misleading. The CR/APL thing is designed so that average means you use a few resources and no one should die and you shouldn't need to rest so you can restart the 5 minute work day right after the fight, not that you and your opponents are evenly matched and both equally likely to destroy each other. I understand the system and what it means and it's intent and how it is meant to be used (as a tool to assist the GM, not something he relies on completely to build his encounters for him), it's just weird when you consider it this way, that both groups are so powerful that they each are completely superior and completely overpower to the other. It's a bit of a paradox and one no one should really think too hard about.
I do dispute that a 7th level PC class enemy, even with normal character wealth by level values, is an average strength encounter for four PCs. Even with some truly creative min/maxing, you're going to get one, maybe two rounds out of a single enemy (unless you completely design the abilities of the enemy and his gear choices to stymie the abilities of the players, which is cheating of a sort). Even a Barbarian only has a base of 48 hit points at 7th level, and with Constitution bonuses were looking at maybe 70-80 hit points, probably more if he rages. A single revolver should do an average of 4.5 hit points of damage, a Sereth long rifle does 7 damage as the average, and after you factor in people having multiple attacks and using spells and powers that do an average of 24.5 damage (assuming they use spells/powers that deal damage at 1d6/level), that Barbarian's 70-80 hit points probably aren't going to amount to much. Like I said one, maybe two rounds. Unless of course the dice really fall in the favor of that single enemy. You can add a little bit of longevity simply by adding more bodies, but now you've got two 5th level Barbarians with 40-50 hit points. So more durability overall, but now the PCs will use area of effect powers. But the fix for that is to spread 'em out and charge them into melee as quick as you can. Still doesn't seem like it is going to impact a party that much, a few valueless bullets, a few power points, etc.
Making encounters is really hard. Sometimes the math works out perfectly, and sometimes it is wildly wildly off and you can't always predict a fight. Even if you look over your stats with a super critical eye. Oh well.