Well let's take it step by step:
1- You will use Laser beams instead of the usual infrared or light beams used normally, this will increase your directivity for the purpose we are dealing with.
2-Both Laser beams used will be identical "for simplicity" therefore we will have to separate them by a distance.
3- Now if a person enters your room he will pass by beam 1 then beam 2, if he leaves it then he will pass through beam 2 then beam 1. This way you can always detect correctly how many persons are inside the room.
Notice that you have an error in this circuit as we assumed that only one person will enter or leave at a time.
I'll try to find ya a schematic diagram to make things simpler.
Regards