Another option would be to simply give a circumstance modifier equal to the square root of the number of guards -- and round down (a.k.a. truncate). So, two or three guards get to Take 10, and get a +1 circumstance bonus (the circumstance being, "multiple guards"); four to eight guards get a +2, three to twenty-four guards get a +3, and so on -- then modified for their alertness.
Where levels of alertness differ, you might want to break the groups up along those lines. So if you hve thirty gurds, ten of whom are asleep ("Take 0"), ten of whom are eating, dicing, or otherwise inattentive ("take 5"), and another ten of whom are on high alert ("take 15") ... you would have three groups.
Lets assume the average spot/listen modifiers for all of them is +5 (a few ranks, a bit of wisdom, whatever -- these're professional sentries ...).
The sleepers, since there're ten of them, would get 0 + average spot/listen modifier + 3, or, 8. If you can't sneak past them, you deserve to be caught.
The gamblers (etc), since they're at least awake, would get 5 + average spot/listen modifier + 3, or, 13. It's conceivable they' notice a Commoner NPC slave/prisoner tryign to sneak away, but most decent rogues should be able to slip past them with no trouble.
The ones ctually on watch, being unusually alert, however, get 15 + average spot/listen modifier + 3, for 23. At this level, even low-to-mid level rogues -- up to level 7 or 8, say -- may have some trouble slipping by unseen. If the rogue gets a 10, and has maximum ranks (10 or 11), they need to have a Dexterity of 16+ to stay hidden. Not unlikely, but, not a guarantee, either. Even an 8th level elf rogue, with a 22 dexterity and maximum ranks of hide/move silently, would have to roll a 7+ to slip past those ten guards.
All this supposes, of course, that the guards re in a singular, reasonably-small area -- no more than a double move's worth of distance between any two of them, for typcial PC-race (or equivalent) guards, say.