Liquid/gas (probably conveyor too) priorities are not remembered upon construction/deconstruction of new pipes.
To establish reliable packet counters, the best way is to have two paths for liquid or gas to take, which splits packets 50/50 between the two routes.
This allows you to put an automation signal which will activate and deactivate continuously, counting packets as it goes.
The problem is, if you construct any pipes, the packets will only flow one way, rather than a 50/50 split.
This breaks so many automation things, and it's really disappointing because it removes reliability from some of the larger automation projects.
There might be a solution using shutoffs, but I haven't been able to make this reliable.
The only fixes I can think for this is:
construct it, then basically never construct a pipe again.
Shut off everything, construct pipes, turn everything on again.
Beg the developers to fix this problem.
I'm trying the third solution. Please fix the problem.
Create a 50/50 pipe split, construct pipes while activated. Observe pipe preferences.