Calculate battery capacity from load
Your formula establishes the minimum A-hr battery capacity. 166/65 = 2.55, so an absolute minimum requirement is 3 batteries of 65 A-hr each. However, if you want long life (in terms of charge/discharge cycles), standard lead-acid batteries should not be discharged more than 50%. This suggests that you should use a minimum of 6 batteries.

If you run the same calculation for 5000 watts and 30 minutes, you'll get the 8 battery requirement which seems to have been realized.