db.getCollection('books').aggregate({$match:{$or:[{state:1}, {state:0}]}}, { $count:"count"})