This was the code: https://github.com/gjb2048/moodle-theme_essential/blob/0066932092cbc7c94c801ca3e30ce6c08c3bdee0/renderers/core_course_renderer.php#L84-L88 and the 'if' statement has now been removed: https://github.com/gjb2048/moodle-theme_essential/blob/MOODLE_28/renderers/core_course_renderer.php#L84-L86.
Recently I discovered that the tally did not take into account the sub-category count. This has been rectified in the M2.9 version and above. I will not be back-porting the code unless remunerated to do so.