Network cardinality estimation using max consensus: the case of