Count number of occurences of nucleotides in string