Fix bug in calculating the number of valid amino acids in a particular encoding