keep track of the cardinality in cython bf
Add snapshot for the poor and union operation