Add maxNumberBatteries()

- Update example & tests accordingly