fix wrong total_entries for the mongoid engine