A series of studies show interest in how visual attributes affect the estimate of object numbers in a scene. In comparison tasks, it is suggested that larger patches are perceived as more numerous. However, the inequality of density, which changes inversely with the area when numerosity remains constant, may mediate the influence of area on numerosity perception. This study aims to explore the role of area and density in the judgment of numerosity. The Ebbinghaus illusion paradigm was adopted to induce differences in the perceived, rather than the physical, area of the two patches to be compared. Participants were asked to compare the area, density, and the number of the two patches in three tasks. To this end, no PSE (point of subjective equality) bias was found in number comparison with randomly distributed dots, although a significant difference was revealed in the perceived area of the two patches. No PSE bias was found in the density comparison, either. For a comparison, density and number tasks were also conducted with regularly distributed dots. No PSE bias was found in density comparison. By contrast, significant PSE bias showed up in number comparison, and larger patches appeared to be more numerous than smaller patches. The density mechanism was proposed as the basis for number comparison with regular patterns. The individual Weber fractions for regular patterns were not correlated with those for random patterns in the number task, but they were correlated with those for both patterns in the density task. To summarize, numerosity is directly sensed, and numerosity perception is not affected by area inequality induced by the Ebbinghaus illusion. In contrast, density and area are combined to infer numerosity when the approximate numerosity mechanism is disrupted by dot distribution.