My understanding is that you should keep all balancing wires same length. You could post a photo of your BMS and some one will know what BMS you have and help you with connecting it. it is strait forward, nothing fancy.
Here is my Panasonic pack, its 5P10S meaning 36V system with 17Ah capacity (3400mah each cell x 5):

you can see 2 5S bricks. 5 cell + connected with 5 cell -, makes a series connection.
Here is a good example of series and parallel connection:
Series:

Parallel:
The C rate is ho fast your cell can discharge. For example you have 1ah cell capable of 1C discharge. This means that it can discharge 1ah in an hour. If it was 5C cell it could be discharged in 20 mins.
For example your controller draws 20 amps and it is 48v controller. that means that you need 20 1ah 1c cells in parallel to satisfy controllers demand without damaging cells. If the cells were 5c you would need 4 cells. If the cells were 3ah and 1c you would need 7 cells in parallel for the same draw.
For a folding bike you need something other than lifepo4. I have compared my 36V A123 20Ah battery pack with my Panasonic 36V 17ah pack. Panasonic battery pack is 60% smaller in size and 51% lighter.
If you need range and your power demands are small to medium i would say to go with lico rather than life. You could get compatible bms from dnmun on these forums who has done some testing on them and they are cheap.
If you need more safe chemistry, long life, go with lifepo4.
We have not heard what you need in terms of range, speed, terrain you will be driving on, finally your folding bicycle brand or photo. This would help deciding on chemistry of the battery, capacity you would need with reserve. After you get your cells, had them done in parallel than series we could help connect proper BMS.
You need to have a plan and not start from the back end
