To increase pollinator populations, international policy targets minimum levels of seminatural habitat cover, but it is unknown whether improving the quality of existing habitats could bring similar benefits without the need of reducing cropland area. Using data we collected in 26 Italian agricultural landscapes during the entire flying season, we explored the relative importance of habitat quantity (seminatural habitat cover) and quality (flower availability) on pollinator densities in seminatural habitats. We obtained transect-based counts and estimated the effect of habitat quantity (proportion of seminatural habitat) and quality (flower cover and richness) on wild bee and hoverfly densities. We used the relationships revealed in the data to simulate pollinator population sizes in landscapes with varying habitat quantity and quality. Wild bee densities were only related to flower availability, whereas hoverfly densities were additionally related to seminatural habitat cover. We found that in complex agricultural landscapes (above 15% seminatural habitat cover), improving habitat quality increased pollinator populations more effectively than increasing habitat quantity. However, increasing habitat quantity was by far the most effective approach for boosting pollinator populations in simple landscapes.