Formatting numbers produced by PaginatorHelper::counter()

Fixes #1965