From the engine code Entity.hpp line 139, the number of docking spots is determined by max(1.0, ceil(planet_radius / 3.0)).
Pretty sure you should be able to dock up to the limit of docking spots simultaneously. If you try to dock more than the limit I think it's somewhat random* (dependent on the iteration order of a c++ unordered_map) which ones actually make it. Are you seeing different behavior?
- edit: Hmm, come to think of it this is something that might cause replaying a game with the same seed to vary the outcome. Fortunately it seems like it should be a fairly rare occurrence.