• You can use the function COUNT_BIG() instead which returns a bigint.

    It uses the same parameters as the count() function.