How many bullets do each of those guns hold?
A quick google search and I found the Beretta has at least a 17rd magazine availble. I know the Glock 17 which is 9mm has a 30rd magazine you can buy (but not in New York)
From Wikipedia:
Magazine capacity
To keep in line with the introduction of laws in some locations restricting magazines that hold more than 10 rounds, Beretta now manufactures magazines that hold fewer than the factory standard 15 rounds. These magazines have heavier crimping (deeper indentations in the side) to reduce the available space while still keeping the same external dimensions and ensuring that these magazines can be used on existing firearms.
Italian magazine manufacturer Mec-Gar now produces magazines in blue and nickel finishes with a 18 round capacity, which fit flush in the magazine well on the 92 series. Mec-Gar also produces an extended 20 round blued magazine that protrudes below the frame by a 3/4 of an inch. These magazines provide users in unrestricted states with an even higher capacity.
A Beretta 92FS (9mm) has a 15-round magazine.
A Beretta .45 depends on the model: he may have had 1 10-round magazine and a round in the chamber.
It's not hard to shoot that many 9mm rounds, especially if you aren't aiming carefully. The low recoil makes it easy to shoot as fast as you can pull the trigger.
With practice, reloading doesn't take any time at all.
Probably 12-15 per magazine for the 9mm and 7 or 8 per magazine for the 45.
It varies from weapon to weapon and magazine to magazine.
I do not think he did this with only one or two magazines per weapon. He probably had 5 or 6 of them already loaded for each.
If one has a bunch of pre-loaded magazines, it’s just a matter of firing until a magazine is empty, pressing the magazine release, inserting a new magazine, racking the slide, and firing some more.