Do manual pagination to work around sqlalchemy issue.
Do manual pagination to work around sqlalchemy issue.

We need to count actual documents returned, not just
the number of rows.

Code4SA/mma-dexter,Code4SA/mma-dexter,Code4SA/mma-dexter