nucleotide-counts: Adopt functional style

As discussed in #79.

Two test cases that don't translate to a functional solution are
removed.