By default, Magento 2 offers some default functionality to display the count of no. of products for a particular category on the category page with the toolbar.
But what if we want to display a count of no. of products as per our essentiality? No worries, with the help of the below code it is possible to display the count of products for a particular category as per our needs.
Here we have used display count with page main title. So, let us do 🚀
teps to Display Count Of Product with Page Title on Category Page in Magento 2:
Step 1: To do this, create events.xml file inside app\Code\Vendor\Extension\etc\ folder and add the below code:
For more details: https://magecomp.com/blog/magento-2-display-count-of-product-with-page-title-on-category-page/