Added logic to only count new objects if they were first tracked near the edge of the frame.