Make ORM::count_all() return an integer instead of a string.

Fixes #4737.