If a task tries to take the semaphore when the integer is equal to zero, then the task will block. These semaphores are called counting semaphore.
Some system offer semaphore that can be released only by the task that took them. These semaphore are useful for the shared data problem, but they cannot be used to communicate between two tasks. Such semaphores are called resource semaphore.