Hiya!
In every edition of D&D I have run or played in at the end of basically every battle the missile weapons users look to the DM and say, I look around and retrieve any arrows I can to replenish my quiver (replace arrows with sling bullets, darts, etc as applicable - but let's stick with the most common, arrows/bolts, for the example).
How do you handle this?
Generally speaking, unless it's obvious, I use a flat 25% + 1d#, where the # is based on surrounding area (and obviously you can never gain more than you shot). For example, a typical dungeon room/corridor, I usually use a d6 or d8. If it's at the edge of a cliff or on the side of a mountain, d4. If it's in a warehouse/home/mansion (with wood walls, furniture, crates, etc), maybe d10 or d12.
Ex: In a dungeon room, with pillars and dimensions of 30'x70'x20', if a PC shot 9 arrows, he'd be able to recover 1d6+2. If he had shot 19, 1d6+4.
My reasoning; the less you shoot, the more likely you remember where you shot and where they may have gone. Even if you hit your target every time, chances are the arrows will break or be unrecoverable for use again. And if you are shooting at an elemental, for example, forget about any that hit. I would then simply subtract that number from whatever the PC could normally recover (e.g., if normally 1d6+5, but 8 shots hit the fire elemental, then it would actually be 1d6-3, with zero being the lowest, obviously).
^_^
Paul L. Ming