In the above case when you run while(-1) , it runs normally like while(1) , that means
while(-1) is true here ,
First 5 processes will enter into Critical section and make X=0 , then P16 will enter and make X=1 , causing yet another Process to enter the CS and thus making total number of processes to 7.
PS: had the question been slightly changed to while(0) , then the answer would be 1 as
none of the process from (P1 - P15) will ever enter the while loop (and will end) , so only P16 will keep entering the loop and incrementing the X value.That way only P16 will be there in the critical section.