If I understand you correctly, in C2, dragged down
=COUNTIF(Sheet2!$A$2:$A$107,Sheet3!A2)
In D2 dragged down
=VLOOKUP(A2,Sheet1!$A$3:$B$52,2,FALSE)
Is that what you are looking for?