Counter machines, Petri Nets, and consensual computation