abstracted countPercLetter to account for sets