SeaChange interview question

How would you use a countable semaphore?