Depends on the barrel.
A quarter million M1911 Barrels
A typical M1911 Barrel is roughly a 5 inch long cylinder of a diameter of 0.6 inch. That's 1.4 cubic inches. Using a form factor of 0.732 as we know from stacking coins, there's one barrel per 1.93 cubic inch. Or in other words: 252314 complete barrels, but no other parts. This method only works for tiny objects compared to the room volume, because these tiny items stack almost like coinage.
42 cylindrical Tin Cans of 4 cubic feet volume
While the form factor would tell us, that there should be space for about 51 barrels in the hole if that hole had an arbitrary shape, the outer dimensions become problematic: Our hole has a fixed shape. 6 feet in diameter, 10 feet high. For the best packing, we assume 7 cylindrical barrels of 2 feet in diameter - or 1-foot radius - in a layer.
Assuming that the barrels are perfectly cylindrical, each barrel would need to be 1 foot 3 inches tall to fit the 4 cubic feet volume (\$\frac V \pi=h\$). Let's round that to 1.5 feet to account for at least some shell that holds these contents.
That means we could have 6 complete layers of 7 barrels or 42 barrels. Or rather, Jerry-cans, as we only accounted for a rather small shell here.
35 classic barrel shaped barrels of 4 cubic feet volume
Now, let's assume the barrels have a 1-inch wood frame, and a 1 inch wood lid. That lid should be at least half an inch inch indented from the top and bottom of the barrel jacket's end. It needs to contain 4 cubic feet of volume or 113.27 liters. Since water has a density of pretty much 1, that's 113.27 kilos of water in that barrel. This happens pretty perfectly with the lid being between 0.9 and 1.9 inches from the top edge, when the barrel is 0.8 feet radius at top and bottom of the jacket. And we demand a round number of feet for the height, so math gets easier. After some experimentation, the measurements in millimeters read like this (sorry, my CAD only outputs mm, it allows me to put in variables in inch though):
This results in 2-feet tall barrels of 2 feet maximum outer diameter while the top and bottom of the barrel curve in to have a 1.6 feet diameter at the ends. Perfect!
Stacked as before, we get a perfect fit of 5 layers of 7 barrels each, for exactly 35 barrels in total.
21 barrels of 40 gallon (+2 malformed ones)
40 gallons are 151.42 liters of water. Using the same basic barrel geometry as before, our 4 gallon barrels need to be 2.7 feet tall to get that (and a tiny bit) of volume.
We can still store 7 per layer, but we only manage to stack \$\frac {10}{2.7}=3,7\$ into the hole, so 3 complete layers for \$3*7=21\$ barrels
If you have two slightly ovaloid barrels or a pair of longer but slimmer barrels, you might manage to get those in as extra: on their flat side on top of the stack.
A proper Jerrycan is of the following dimensions: 165x345x470 mm. Stacking those in a portable hole gives this pattern of 38 cans per layer:
6 complete Layers fit into the hole, so 6*28=168 canisters filled with 3360 liters of water or fuel. Or 887,6181 gallons for the imperial types - the equivalent of a little over 22 barrels of 40 gallons. But the standing Jerry cans still leave just enough space above for a top layer of 10 extra cans laying on the side:
That's 200 more liters, for a total of 3560 liters or 940.4525 gallons. The equivalent of 23.5 barrels.
Wait, there's even a better stacking with 12 extra lying cans, for 40 more liters, so a total of 180 times the 20-liter canister. 3600 liters stacked in German engineering!