replaced active clients counter for semaphore