Find Total Number Of Occurrences Leetcode