Chicken surveillance

Hi there!

I have a question regarding a smart home project and was hoping i could get some adive here.

I have a small barn in the garden with 7 chickens running around there. In the evening all the chickens walk into the barn and the barn door closes automatically 1h after dawn…so far so good.

But sometimes it happens that one of the chickens didnt find the way in and stays outside over the night (which is quite dangerous unfortunately :frowning: )

Currently i check manually via a webcam if all 7 chickens are inside of the barn.

But i was wondering if i could automate that? Is there anything you know of that could do the trick? some sort of small tags mountet on the chicken legs and some kind of system that registeres if those tags are inside of the barn?

Would be very thankful for every advise i could get here…