To automatically set the number of staves in every frame:
Layout Options > Staves and Systems > Casting Off > Fixed number of systems per frame
(In that dialog, Scale number of systems by frame height simply means that smaller frames will have less staves in them)
To manually force particular systems into a frame:
Select an object on the first beat of the first bar and the soon-to-be-final barline > Make Into Frame (use the Jump bar if you don’t know where to find this)
