Disjunctive logic programming (DLP) is a very expressive formalism. It allows forexpressing every property of finite structures that is decidable in thecomplexity class ΣP2(=NPNP). Despite this high expressiveness, thereare some simple properties, often arising in real-world applications, whichcannot be encoded in a simple and natural manner. Especially properties thatrequire the use of arithmetic operators (like sum, times, or count) on a set ormultiset of elements, which satisfy some conditions, cannot be naturallyexpressed in classic DLP. To overcome this deficiency, we extend DLP byaggregate functions in a conservative way. In particular, we avoid theintroduction of constructs with disputed semantics, by requiring aggregates tobe stratified. We formally define the semantics of the extended language (called ), and illustrate how it can be profitably used for representingknowledge. Furthermore, we analyze the computational complexity of , showing that the addition of aggregates does not bring a highercost in that respect. Finally, we provide an implementation of in DLV—a state-of-the-art DLP system—andreport on experiments which confirm the usefulness of the proposed extensionalso for the efficiency of computation.