Also, the query in the OP would pull out all the PMs and deleted topics as well.
I think it would need to be more like:
SELECT
COUNT(*)
FROM topics t
JOIN categories c ON c.id = t.category_id
WHERE c.read_restricted IS FALSE
AND t.archetype = 'regular'
AND t.deleted_at IS NULL