How can I count number of people passed the polygon

I was exploring https://github.com/ultralytics/ultralytics/tree/main/examples/YOLOv8-Region-Counter and curious to know if I can retain the number of person passed the polygon