Species richness is the most widely used biodiversity measure. Virtually always, it cannot be observed but needs to be estimated because some species may be present but remain undetected. This fact is commonly ignored in ecology and management, although it will bias estimates of species richness and related parameters such as occupancy, turnover or extinction rates. We describe a species community modeling strategy based on species-specific models of occurrence, from which estimates of important summaries of community structure, e.g., species richness, occupancy, or measures of similarity among species or sites, are derived by aggregating indicators of occurrence for all species observed in the sample, and for the estimated complement of unobserved species. We use data augmentation for an efficient Bayesian approach to estimation and prediction under this model based on MCMC in WinBUGS. For illustration, we use the Swiss breeding bird survey (MHB) that conducts 2?3 territory-mapping surveys in a systematic sample of 267 1 km2 units on quadrat-specific routes averaging 5.1 km to obtain species-specific estimates of occupancy, and estimates of species richness of all diurnal species free of distorting effects of imperfect detectability. We introduce into our model species-specific covariates relevant to occupancy (elevation, forest cover, route length) and sampling (season, effort). From 1995 to 2004, 185 diurnal breeding bird species were known in Switzerland, and an additional 13 bred 1?3 times since 1900. 134 species were observed during MHB surveys in 254 quadrats surveyed in 2001, and our estimate of 169.9 (95% CI 151?195) therefore appeared sensible. The observed number of species ranged from 4 to 58 (mean 32.8), but with an estimated 0.7?11.2 (mean 2.6) further, unobserved species, the estimated proportion of detected species was 0.48?0.98 (mean 0.91). As is well known, species richness declined at higher elevation and fell above the timberline, and most species showed some preferred elevation. Route length had clear effects on occupancy, suggesting it is a proxy for the size of the effectively sampled area. Detection probability of most species showed clear seasonal patterns and increased with greater survey effort; these are important results for the planning of focused surveys. The main benefit of our model, and its implementation in WinBUGS for which we provide code, is its conceptual simplicity. Species richness is naturally expressed as the sum of occurrences of individual species. Information about species is combined across sites, which yields greater efficiency or may even enable estimation for sites with very few observed species in the first place. At the same time, species detections are clearly segregated into a true state process (occupancy) and an observation process (detection, given occupancy), and covariates can be readily introduced, which provides for efficient introduction of such additional information as well as sharp testing of such relationships.