Update CountSubstringOccurrences