Pregunta de entrevista de SeaChange

How would you use a countable semaphore?