Counting algorithm for aerial survey

My drone makes a serpentine path over a geofenced area of four gps coordinates and within these coordinated the drone follows the back and forth path…Now there are a mix of 2d and 3d objects scattered throughout the area ….it must start the process if counting as soon as it sees and shape or a object .
The issue we are facing is how to begin the concept of counting as there my drone moves back and forth and there might be a overlap of 30 to 40 % of the cam feed through the same path .
For ex:

One circle and one square is detected in the frame
my fps is 30
I want my count to be 1 and 1 respectively until these above shapes are in my frame .
after moving frontwards , suppose I detect 2 square,1 triangle and 4 cones the count must be shown accordingly without duplicate counting

below is the path planning diagram

Use Multi-Object Tracking with Ultralytics YOLO - Ultralytics YOLO Docs