Support paginate(:total_entries => n) for dm