Fix incorrect count used by paginator

The paginator was using the distinct count based on the context rather than the
full record count after the view was applied.