Carpark entry counter

There is no point testing IRTrigger1 or IRTrigger2 as they are both defined as constants.

You should be testing IRState1 and IRState2.

You don't seem to have any code to figure out which IR was triggered first.

I think your logic needs to be something like this

wait until both sensors are off ... then
if sensor1 is on and sensor 2 is off there is an incoming car
but don't count it until sensor 2 goes on
if sensor2 is on and sensor 1 is off there is an outgoing car
but don't count it until sensor 1 goes on

...R