What voltage of Li-ion battery to run 24 volt motor (6 cell or 7 cell)
Motor voltage ratings are designed to allow you to run the motor at its rated voltage continuously, without overheating and burning out the motor.  So if you value the life of the motor, you will run it at or below its rated voltage, which in this case means six cells.

Further Reading
https://bricks.stackexchange.com/a/799