module ActiveFedora::Calculations

def calculate(calculation, conditions, opts={})

def calculate(calculation, conditions, opts={})
  SolrService.query(create_query(conditions), :raw=>true, :rows=>0)['response']['numFound']
end

def count(*args)

Takes :conditions as an argument
Get a count of the number of objects from solr
def count(*args)
  return apply_finder_options(args.first).count  if args.any?
  opts = {}
  opts[:rows] = limit_value if limit_value
  opts[:sort] = order_values if order_values
  
  calculate :count, where_values, opts
end