fixed incorrect total count when using specific column in paginate()

Signed-off-by: Andreas Heiberg <git@andreas-heiberg.com>