Added counter semaphore