Use StringCounter to store substring statistics