Escuse me if my english is bad, i'm french^^ I developed a system with arduino that turns on or off the light if one or more persons are inside or not. the description of the video is in french but there is not need to understand :). if the first laser is cut, the algorithm wait that the second laser is cut : a personn enters, if it's a first personn the lamp lights. If the second laser is cut, the algorithm wait that the first laser is cut : a personn leaves, if it's a last personn the lamp turns off. In the video, an LED simulates lamp of the room, so the relay.
youtube link: Intlaser with Arduino by Yorm Robotics - YouTube