yes, max =2 and min=-2
bcz,counting semaphore can take any integer value up to the number of process that can enter into critical section or leave the critical section.
that is why here semaphore value max=2 and min =-2(i.e in first case two process entering critical section and in second case two process leaving critical section).