```
from sqlalchemy import func
request.db.query(func.count(models.ArticlePkg.id)).scalar()
```