# File lib/will_paginate/active_record.rb, line 61 def count if limit_value excluded = [:order, :limit, :offset] excluded << :includes unless eager_loading? rel = self.except(*excluded) # TODO: hack. decide whether to keep rel = rel.apply_finder_options(@wp_count_options) if defined? @wp_count_options rel.count else super end end