Added support for counting ones in a pbf.
Fixed a bug in the query pdf method.
Added support for inserting the true batches several times.