When connecting batteries in series, there is no practical limit to the number of batteries, as the output voltage will continue to increase. However, when connecting batteries in parallel, it's crucial to ensure they are identical in manufacture, part number, and state of charge to avoid dangerous current flows that could lead to catastrophic failures. It is recommended to limit parallel connections to no more than two batteries without special monitoring. For series connections, using no more than three or four identical batteries is advised to prevent damage to the weakest cell. Proper monitoring of battery voltage is essential to maintain safety and avoid issues such as polarity reversal.