count (DataMapper::Aggregates::Functions)

    # File lib/dm-aggregates/aggregate_functions.rb, line 30
          def count(*args)
            query         = args.last.kind_of?(Hash) ? args.pop : {}
            property_name = args.first

            if property_name
              assert_kind_of 'property', property_by_name(property_name), Property
            end

            aggregate(query.merge(:fields => [ property_name ? property_name.count : :all.count ]))
          end