Activating MP3 Shield when People enter the door


First of all, i'm not very experienced with Arduino (have done 1 project before, with a servo), so please keep that in mind :P

The purpose of this project is to play one song repeatedly when a person is in the room. I want to achieve this by attaching a arduino MP3 shield on a arduino UNO. My idea for recognizing people entering the room is to position a push- button switch in the door- frame. In that case the song should start playing when de door is opened. The problem is that the song will stop when people will close the door behind them (the song should stop when people leave the room). Do you guys have any thoughts about this, or maybe a other solution then the push- button switch (I was also thinking about a IR- sensor)?

Any help would be more then welcome!

How will you determine that opening and closing the switch happens because someone is entering the room, as opposed to a person leaving the room?

How will you distinguish between someone opening the door, and looking in the room, without entering, from someone actually entering the room?

How will you deal with two people in the room?

A single switch is not sufficient. Look at all the places where it is important to know how many people have passed a particular point. All of those places make sure that a person MUST pass two points. The points are set up to not allow more than one person at a time to pass. The order that the two points are passed defines whether the person is entering or exiting.

An IR sensor is easier, but it detects motion. If the person enters the room and stays very still, such as while sleeping, the IR sensor will stop detecting the person.