counting the lines of diff files in loop

i have two file.

i want to count the lines of each file one by one in loop and compare it.

can any one pls help me on this?

What have you tried so far?