calculating total questions answered by student for each r