Paginator::getTotal() was returning a string

Ints as strings are annoying when you're making a JSON API.
Merge pull request #2308 from philsturgeon/patch-1

Paginator::getTotal() was returning a string
fix ordering of args.
Merge branch '4.0'