A counting semaphore based on Java's Concurrent Semaphore.