Increment Child Table No

I have 2 tables: Work Orders & Tasks. I want to increment each new task no for a given WO.

WO#1

Task 1

Task 2

Task 3

WO#2

Task 1

Task 2

Task 3

Task 4

etc etc

I added a Count(Tasks) field to WO’s. I added a lookup of Count(Tasks) to the Tasks table

I built an automation (When record is created) to get the lookup and increment by 1, but that ends up giving me 6 as the next task# in WO#2, rather than 5. So I changed the automation to just use the Count(Tasks) value which gives me the correct 5 as the next #. It seems like AT creates the new record, then updates the Count(Tasks) field, then updates the record. Is that what’s happening? In other products I’ve always had to increment. AT apparently not.

Any confirmation and clarification would be much appreciated.

Thanks