Posts per category (with deleted and without deleted)
I think that by default deleted topics/posts will be included in data-explorer statistics.
Doing some quick experimentation on a category where we delete a lot of stuff:
SELECT count(*) from topics
WHERE category_id=40
returns 799
And then, deliberately excluding deleted topics
SELECT count(*) from topics
WHERE category_id=40
AND deleted_at is null
returns 416.
So to get the statistics you want, I think you can just run the query without checking deleted_at