Fix issue #6 (semaphore max_count).
Merge pull request #15 from antoinealb/issue-6-max_count

Fix issue #6 (semaphore max_count).
I think we all agreed that this was the right thing to do (for now).