You can use as many or as few batteries as you like. We decided to use 8 which gives us around 1.5 to 2 hours of backup power for the entire system. You should test all your batteries to check they are not faulty before being used in your system, Test them with a volt meter first, they should measure between 12 and 13.5 or so volts. You should them test them under load, I use a 12v bulb for this. If they fail, they may just be in need of a recharge. I recommend using a Gel charger but any 12v battery charger should do.
If using a 12v Inverter your batteries should all be wired in parallel, this will keep the voltage the same but increase the current output and life of the battery bank.
A spade connector should be crimped to the end of each wire to connect to a battery, this allows the battery to be swapped out if it becomes faulty (or vents because you managed to short it).
Now is probably a good time to mention that you will be working with a very high current supply which is not dangerous is treated properly. 12v is not enough to break down the internal resistance of your body so you will not be electrocuted by the supply. However if you short/drop/misuse the batteries you could well be burned, blinded, or poisoned by release of toxic gasses. Take the appropriate safety measures, do NOT breathe vented battery smoke :P. I am not to be held responsible for anything irresponsible you do!
I have attached the wiring diagram for the entire UPS but I strongly suggest you watch the video of our system HERE
(along with all the other videos on our channel)