Article Count for every category in sidebar of listing/category page

As I understand you want to get the id for every child category then calculate the product count to show it in the template.

 

Also sCategories have all child categories you just add the code to your plugin.

 

Und loop throug the child categories calculate the product count and add it to the child category array.

Then reassign sCategories variabel to the the view

In your template you can use the new array key which you had added and have the products count.

I hope this will help you.

Regards

Ahmad