25 short spears. But the answer also depends on the training of the spearmen.
(excellent answers from the other contributors)
You can assume that any competently trained spearmen - ranging from the town guard to the Roman legions - have specific training in maneuvers to hem in, drive, corner, capture or execute any [correct smaller] number of enemy.
Remember this well choreographed scene?:
About 18 trained horsemen surround 3 captives, and draw their spears on command. Ostensibly this maneuver was practiced routinely by this set of soldiers. They are not in much danger of hitting each other as they thrust forward.
In TROS none of these spears have to do lethal damage to execute the captives; a few merely need to deal some damage. As stated elsewhere here, the individual captive's defense pool is divided and a portion is assigned to each immediate attacker. Once hit, the captives' dice pools (for both attack and defense) drain away quickly, leaving them exposed to some attackers. On successive rounds the captives may be gradually ventilated and safely skewered.
But that is all based on game theory and a movie still. Let's now talk "real world" and "short spear" in this example:
I count 25 bayonets at shoulder/neck level, with at least 4 more out-of-range but ready. These soldiers also have had adequate training with the bayonet: they know what they are doing; they are not at risk of harming each other with 25 jabs forward.