count last nucleotide