im looking for a obstacle counter using ir led pair as detector and arduino as counter but i could n't find any code so any link to a code or a website
Which IR LED pair? Are you able to connect this pair to the Arduino? Are you able to get the pair around the obstacle? Are you able to determine when there is an obstacle present? If so, the counter is pretty easy:
obstacle++;