fix pagination when @total_size is devisible by @count
Merge pull request #774 from pitr/fix_pagination

fix pagination when @total_size is devisible by @count