Listview: Make it possible to apply count theme with a class

Fixes gh-6966
Closes gh-7457