Added typecasting total_pages to int instead of float when recalculating

When I did a var_dump on it was a float, but all of the other pagination configs were ints.