Number Of Equal Count Substrings Leetcode Javascript