I want to make a simple occupancy sensor using two PIRs, by having a counter (inside the code) that increases by 1 when PIR1 detects motion before PIR2, and decreases by 1 when PIR2 detects motion before PIR1. So that whenever the counter is above zero (indicating the number of people in the room) the lights turn on, and when everyone gets out i.e. the counter becomes 0, the lights turn off.
However, I wanted to test this using a LED before wiring the device to the room lights, as shown in the following image:

My problem now is with the code, I can't figure something out that satisfies these requirements, it's very essential for this to work is that the Arduino differentiates between which PIR gives an input before the other.
I know that this solution for an occupancy sensor may not be very practical, but I want to make the most out of these two PIRs only.
I only need help with the code, however if you have a better idea for a simple occupancy sensor, please be my guest.
Arduino: Uno.