Single three-spined sticklebacks, Gasterosteus aculeatus, were frightened with a light stimulus simulating an aerial predator while facing a choice between two conspecific display shoals of different membership sizes. We observed which shoal the test fish approached. Initially, both display shoals were equidistant from the test fish. The smaller shoal was then moved gradually closer whereas the larger shoal stayed at a constant distance. This experiment modelled an early stage of the aggregation behaviour of sticklebacks in response to perceived imminent predation risk. When the two display shoals were equidistant from the test fish, we found that the test animal preferred approaching the larger display shoal, and the magnitude of this preference increased with increasing display shoal size difference. This demonstrates that the aggregation behaviour of frightened sticklebacks is density dependent. Further, we found that sticklebacks made a trade-off between the distance to a display shoal and its membership size. In particular, for a given ratio of display shoal sizes, there was a critical distance at which half of all tested animals turned to one and the other half to the other display shoal. This demonstrates that the observed aggregation behaviour is also distance dependent. We introduce several elementary models which formalize individual predation risk and explore how distance and display shoal size contribute to total risk. In particular, we distinguish between total risk as a product or as a sum of the risk components associated with swimming distance and display shoal size, respectively. All models follow the `partial preferences' paradigm of McNamara & Houston (Anim. Behav. 35, 1084-1099 (1987)). We compare how closely these models match the observed data and how well they predict the empirical critical distances. We find a consistent discrepancy between theory and data, which we resolve by invoking a fundamental perceptual limit (numerosity) for shoal size discrimination.