system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do car parks know how many spaces are available?
gpt
Is there a barrier on the entrance and exit?  Barrier on the entrance goes up, -1 parking space.  Barrier goes up at the exit, +1 parking spaces.  Start with a known quantity, cos we can count the number of bays, deduct 1% to allow for dicks parking in two or more bays, and away you go.

When the number reaches Zero, the car park is full.  Illuminate the neon sign that says Car Park Full.