Total Number Of Occurrences Leetcode