added semaphore counter logic to Cars