So I'm trying to design an RPG, and I find myself stumped by the above question. When concerning archers, it was relatively easy to find that a quiver could contain a sheaf of arrows (24), but I find this question for riflemen more difficult.
The firearm technology is still at a muzzleloading/flintlock stage, where only the most advanced nations (more like nation, singular) have moved on to using metal cartridges.
So back to the question: American Revolutionary War era; how much ammo did the average soldier carry for his musket?
American, British, and French soldiers in the Revolution carried their ammunition in the form of pre-made paper cartridges, which contained both shot and powder. They kept these in leather cartridge boxes slung over the shoulder on a strap. Most cartridge boxes contained wooden blocks with a number of holes drilled, each of which would (theoretically) house a cartridge. British Army cartridge boxes were not made to any uniform pattern, but 26- and 29-hole boxes were common. The standard American pattern, adopted in 1777, was based on a British 29-hole box. I believe the French most commonly used a 30-hole box, but I don't have good sources for that claim. How many cartridges a soldier actually had in his possession would depend on a number of factors: the supply situation, depletion in battle, etc.
You mentioned rifles, so I'll just add a bit on for that. The vast majority of soldiers in the Revolution, even the militia, fought with smoothbore muskets. The few riflemen who served in the Revolution did not generally use cartridge boxes and paper cartridges. Rather, they loaded their (very slow) specialized weapons with loose powder and shot. If there is any information on how much of each Morgan's Riflemen or various militiamen carried with them, I haven't seen it.
Finally, by the Civil War, the US Army was still using cartridge boxes to contain musket and rifle-musket ammunition, but they had switched from wooden blocks to tin, and the capacity had increased. Forty rounds was the standard full issue in that war.