I just watched the episode again, and Nicholas and Glenn both appear to run out of ammo. when they switch to knives. It is possible that Nicholas saved one bullet for himself. They might have also had enough time while standing on top of the dumpster to reload (although they did not show them reloading on screen). Also, Glenn is carrying what looks like a messenger bag. Not sure what’s in it other than Herschel’s watch, but they could have had some extra ammo in there. Or Nicholas could have had an extra magazine on him.
Okay...thanks, CJ. It looks like we have no way of knowing whether they ran out of ammo or not.