Added counting semaphores module (untested)