The number of batteries you can connect in series depends primarily on the voltage requirements of your application and the specifications of the batteries themselves.
There are mainly three different wiring configurations, which are series, parallel, and hybrid connections. This solar panel wiring guide explains different methods and includes practical wiring diagrams and actual examples of ways to design a reliable and efficient solar power.