`comments` in this context is an instance of `DataMapper::Collection`.  While the [`dm-aggregates` gem](http://datamapper.org/docs/dm_more/dm-aggregates.html) does provide a `sum` method, it's purely a database operation and won't work in this context.  ActiveSupport *does* provide a [`sum` method on Enumerable](http://api.rubyonrails.org/classes/Enumerable.html#method-i-sum) that would work the way you describe.