Creates a counter and adds parameter string. word is the word to count
SubStringFrequencyCounter.fromString(String? str, String? word) : _substring = word { add(str); }