SIGN IN SIGN UP

Move `count()` to `CountTrait` (#3097)

* Move `count()` to `CountTrait`

* Keep count() on PaginatorTrait

Instead of a dedicated CountTrait, keep count() as a default method on
PaginatorTrait. It wraps the query as-is in a SELECT COUNT(*) FROM (..)
subquery, so it honors any limit/offset set on the query, unlike
num_items which resets them.

---------

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
狐
狐狸 committed
4500c3be37f51b21064a2aa064acc0e11050d8fb
Parent: d83f639
Committed by GitHub <noreply@github.com> on 7/19/2026, 6:27:34 PM