The answer depends on the area that's defended, the type of the mooks attacking and the overall heroicness level of the world this is happening in.
Going by the assumption that no special powers equals badass normal the conditions need to be quite strict for them to stand a chance:
Killing the characters would be easiest with missile weapons -> make sure that's not possible: the area needs to have enough cover and concealment; reduce the enemies' range of sight enough to make attempts at missile combat suicidal (the only range at which combat can happen is so short that archers/slingers/javelineers won't have time to attack before getting skewered)
Getting surrounded and mobbed by the army is instant TPK -> the area needs to break the attacking force apart and not many can attack at once.
A competent leader on the other side will try to exploit their advantages as much as possible -> having the other side be unaware of the situation can be critical -> misdirection and deception will be key, to make the defenders look more numerous.
When the enemy is broken to small groups, the defenders (preferably with mobility advantage with hidden passages or something similar -> makes them look more numerous) will try to get as many "cheap kills" as possible, using psychological warfare in an attempt to break the attackers' morale and make them more vulnerable. Traps will help a lot. A reputation will too.
This way they can rack an impressive kill count without resorting to blatantly implausible ninjutsu. If the universe allows the characters to be more super start reducing the "unfair" advantages, beginning with those that seem the "cheapest" while retaining as much advantage as possible: this will make it seem more heroic but will require proportionally greater badassery to pull off.
(take with some salt since this is based on "common sense" instead of in-depth knowledge of fighting)
edited 8th Feb '11 9:20:03 AM by ChurchillSalmon