In D&D, sorta. If you have say less than 6 of something, then yes, like say daggers or javelins. You could conceivably run out in a single fight. If you have a dozen or even twenty+, as it typical for arrows or bolts? Not really.
A given campaign can change this, especially at lower levels. If...