Carry out the process on a piece of paper. I will demonstrate:
get a number from the file (say 1)
get a number from the user (say 2)
see that they are not the same and do nothing
get the next number from the file (say 3)
get the next number from the user (say 3)
Indicate to the user that they were correct
see that they are the same and save "1" as the count correct
get the next number from the file (say 3)
get the next number from the user (say 3)
Indicate to the user that they were correct
see that they are the same and save "2" as the count correct
get the next number from the file (say 2)
get the next number from the user (say 4)
see that they are different and don't change the count correct
Indicate to the user that they got 2 correct on that line
reset the count correct to 0
Continue doing this for an entire file.
Once, done with that, you can notice what variables you needed (what numbers you got, computed, etc.) and what steps you need. It shows that you need something for a number from the file, a number from the user, and the number correct (at least). It also shows when you need to reset a counter and can indicate what should be in a loop