# File lib/will_paginate/finder.rb, line 99
      def paginated_each(options = {})
        options = { :order => 'id', :page => 1 }.merge options
        options[:page] = options[:page].to_i
        options[:total_entries] = 0 # skip the individual count queries
        total = 0
        
        begin 
          collection = paginate(options)
          with_exclusive_scope(:find => {}) do
            # using exclusive scope so that the block is yielded in scope-free context
            total += collection.each { |item| yield item }.size
          end
          options[:page] += 1
        end until collection.size < collection.per_page
        
        total
      end