Scripting: Updating One Push Field after finding other that maches

Hi there -

I am wanting to do something similar to the Task from Template except when I am pushing, I want to have done a count that shows up in a different field.

I am needing / wanting to see if there is an efficient way to check the list of what would be the template ‘Tasks’ and then go through and find matching entries and do a count (like finding the average time spent previously) and then pushing that to the table.

I am not sure if it’s better to loop, or do an update, etc.

I’d like it fully automated so we can change and adjust things as we go.

Link to the base is here: https://airtable.com/tblqT5vq9owm1wx2S/viwA1XTRfGpdZLrlY?blocks=bipbsFnhKmDB62OIL