you need to add & signs when switching from strings to variables in your formula definition:
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[" & count1 & "],Sheet1!C[" & count1 & "]:C[" & count2 & "],5,FALSE)"