PIR Sensor output to firebase

MIKUxICE:
...this is just the assignment task. Must do it using PIR sensor.

What people are telling you is that the assignment, as you have described, cannot be done.

Maybe you have not understood the assignment properly?
You can use a PIR to detect that people are in the corridor and you can count the number of times people are detected in the corridor but you cannot use the PIR to count the number of people in the corridor.