For social animals, group size discrimination may play a major role in setting the trade-off between the costs and benefits of membership. Several anuran tadpoles show different degrees of social aggregation when exposed to the risk of predation. Despite the importance of aggregative behaviour as an anti-predatory response, the mechanism underlying tadpole choice of the group to join to has not been sufficiently investigated. To establish whether visual cues provide sufficient information to enable tadpoles to choose between aggregations differing in size, we explored the abilities of the larvae of two anuran species (green toad Bufotes balearicus and edible frog Pelophylax esculentus) to discriminate among four numerical combinations of conspecific tadpoles (1 vs. 4, 3 vs. 4, 4 vs. 6 and 4 vs. 8), either in the presence or absence of predatory cues. Our results suggest that in anuran larvae the capacity to discriminate between quantities is limited to small numbers (1 vs. 4 for B. balearicus and both 1 vs. 4 and 3 vs. 4 for P. esculentus). Predator-exposed toad tadpoles stayed longer close to the larger group, supporting aggregation as a major anti-predator behaviour in bufonids, while frog tadpoles showed a preference for the smaller groups, though in predator-free trials only, probably associated with lower intra-specific competition.