How to display on my number of free parking on 4 digit 7segment using IR obstacl

shaandilesh:
And where should i start initializing my count? in the setup or before?

Either place could work.

byte parkingSpacesOccupied = 0;

void setup()
{
}

or

byte parkingSpacesOccupied;

void setup()
{
   parkingSpacesOccupied = 45;
}