For some categories, cat_pages is less than cat_subcats, for example:
> select * from category where cat_title='Wikipedia_soft_redirected_categories'; +--------+--------------------------------------+-----------+-------------+-----------+ | cat_id | cat_title | cat_pages | cat_subcats | cat_files | +--------+--------------------------------------+-----------+-------------+-----------+ | 795306 | Wikipedia_soft_redirected_categories | 65901 | 65907 | 0 | +--------+--------------------------------------+-----------+-------------+-----------+
This looks like some kind of bug, as pages count includes subcats count. Checking on enwiki shows there is no pages in that category, only subcategories, so the counts should be identical.