title: what is Counting Semaphore?
body: <p>Hi I did get how the Counting Semaphore works? Please help me in understanding.</p>
  
  <p>As per my understanding if we set count as 3, then process can use 3 threads to access the resource. so, here just 3 threads have access on the resource. When 1 thread leaves the other waiting thread comes in. If my understanding is correct, these 3 thread can corrupt shared data too. Then what is use of it?</p>