It's controlled by your "logistics" capability -- this is a set total sum of ship logistic sizes that can be in one fleet. To put two fleets in one, drive them to the same square and then click on the "manage" button to the lower left. Then you can click, shift-click a,d etc., on ships to put in the same fleet.