There are quite a few problems in your code!
you define count in two places: one outside the while loop and the other inside the loop. You should only define count in ONE place and then use it where you need it.
The same for the array: anArray. Define it outside the loop. Then assign values to it inside the loop as the values are received from the user.
The next part of your code needs to be completely redone. Here you need to prompt the user for what to search for: A or B etc and then you need a loop to look at each of the scores one by one to see if it is in the desired range and if it is, to count it. After the loop is done, print out the results.