Counterflashing is common on chimneys to cover the upturned leg of the step flashing woven into shingles. It is also a good idea on roof/wall intersections to allow step flashing replacement during a reroof.
In this video, Kirk Giordano adds a z-style counterflashing over a roof/wall flashing to allow the homeowner/GC more flexibility in the unique situation this particular house offers.
When replacing the roof, you shouldn't have to break into the wall stucco, so creating a flashing in two parts adds options for future home improvements.
Kirk also talks briefly about nail types. He is using a ring-shank nail with a rubber washer under the extended head to hold the roof wall flashing to the roof and to hold the nail to the substrate.