I'm brand new to the world of electronics and not very talented, so have mercy.
I was wondering if I could connect the input pin of an Arduino (or Adruino programmed AVR microcontroller) instead, to count +1 if the beam is broken by a person passing. Possibly with a delay() function of sorts, to keep it from counting up more than once.
EDIT: Apologies for not being accurate on power supply. Unlike this scheme indicates, I used a 9V battery and a 7805 voltage regulator to get 5V on this circuit. Meaning, I believe it would pair well with an ATtiny, programmed via Arduino, that can take 5v as well.
The end goal, to complete the story, is to do this with two IR beams, physically a bit apart, their receivers connected to two pins of an AVR microcontroller. The pins register the time stamp of breaking the beam. By comparing the two, we can determine the direction. Going into the room counts +1, going out - 1. Finally the AVR checks if the sum is larger than 0. If yes, someone is in the room and it lights a red LED.
I understand there are many issues that need to be resolved in the software to make the counting accurate. That's for a later day or, preferably, someone else.:)