SeaChange Interview Question

How would you use a countable semaphore?