Web Analytics

Fill the form & Get Installation Support

    You can get the total category count for the store in Magento 2 by using the getCount() method.

    You can fetch that information from

    All you need to do is just create a simple Model class which will help you to retrieve the total number of the category.  Code is as per below.

    Once you done with the code part, you can call method by using below command,

    $categoryCount = $this->getCategoryCount();

    That’s it.

    Fill the below form if you have any Magento programming need.

      Recent Articles

      Author Info

      Author Image

      Magento Developer

      Hire G. Patel

      Get a Free Quote

        Let our Magento expert connect to discuss your requirement.

          We offer Magento
          certified developers.

          Our Magento clientele
          is 500+.

          We sign NDA for the
          security of your projects.

          We’ve performed 100+
          Magento migration projects.

          Free quotation
          on your project.

          Three months warranty on
          code developed by us.