countNucleotides uses an STArray instead of a Map.