The dollar weighs 22.5g but the bucket has a capacity of 5 gallons. One is a measure of weight, the other a measure of volume. To find the answer we need to find the volume of the dollar which depends on its density, then the volume=density/weight=density/22.5. The next problem is to fit the dollar pieces into a bucket we need to melt them down to make full use of the capacity of the bucket. If we assume they are not be melted down we need to know the dimensions, the radius and thickness. It is 26.5mm in diameter and 2mm thick so its volume is 1103.09mm^3=1.10309cc.
5 dry US gallons=22024.42 cc. So 22024.42/1.10309=$20000 approx. if all the material of the dollar were to be used. There is a certain amount of airspace between the coins which reduces the packing to less than 20000. The dimensions of the bucket are also needed. If we assume that the coin fits into a cuboid 26.5 by 26.5 by 2 then the effective volume of the coin is 1.4045cc and the capacity of the bucket is about $15680. Therefore between 15680 and 20000 dollar pieces will fit into a 5-gallon bucket.