In the original Super Mario Bros., Mario can have two fireballs on screen at once.
Mario gains the ability to throw fireballs after collecting a Fire Flower. In the NES version of the game, the fireball system is limited to two active projectiles at a time. If both are still moving or interacting with the level, pressing the button will not create a third fireball; Mario must wait for one to disappear or hit something.
This limit is easy to miss because fireballs bounce along the ground and usually vanish quickly after striking an enemy. Skilled players can use the two-shot allowance to defeat nearby enemies in rapid succession, especially in crowded underground or castle stages. The mechanic also applies to Luigi when he has Fire Flower power.
The answer refers to simultaneous fireballs, not the total number Mario can throw during a level. He can throw many over the course of a stage, but never more than two are active at the same moment in the original NES game. Later Mario games changed projectile behavior and limits, so the rule is specific to this classic version.