Refactor hidden threads count.

It concerns filtered threads too, not just manually hidden threads.