improved example implementation of nucleotide-count