laravel/framework — pull request #919 by AndreasHeiberg (2013-04-13 15:47:04+00:00)
Title: fixed incorrect total count when using specific column in paginate()

Doing this would give me a total of 21 but should give me a total of 3:

$customers = $survey->customers()->paginate(5, ['customers.id']);
dd($customers);

I found the problem to be that paginates second param was never passed to getPaginationCount in Query/Builder