FIX: count new and unread respects muted categories (PR #10131)

countCategoryByState function should take categories muted by the user into consideration

GitHub

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/new-topics-not-showing/156974/4

I do not think this is correct, this is only meant to apply to new topics, not to unread. You need to amend it so this change only impacts “countNew”. Even if a category is muted you may have specific topics in said category you are tracking or watching.

looks good to me now! merge away