I wanted to delete millions of old records.date is a field we can use that

Db.getcollection(‘da’). Count({year:{$lt:2021}})

Actually this was for finding count of record its about 50Million. So we cant delete that much at a time. we dont need to insert other conditions. Just delete those all records is enough.

So what u suggest is delete per month right?