I'm developing a plugin that is using the comments table with custom
comment_type for CPT replies. The problem was that, I's getting replies to my CPT in Comments page (
/wp-admin/edit-comments.php). So I used a filter to put 'em out of the comments list. It's working fine, and stripping my replies to CPT out of the list table (even in trash). But the comments (replies) that in trash is showing a count, if I deactivate my filter those comments (replies) are there, so the count is real.
As you can see in this screenshot that, my filter is active, all my CPT replies are hidden, and only a single trashed comment in the list that is from post type
post, but the count is showing the real data (3) as I have 2 trashed CPT replies.
But I want the count to be real with the view. As the view does contain a single comment (because I'm hiding the CPT replies with a custom filter), I need to show the count as of the view (1). I'm struggling finding an appropriate filter for that.
So, how can I control the comment counts (in pending, spam, and trash) filtering my CPT replies?