when I call
db.collection.remove({\'condition\':\'some condition\'});
This one line will delete all the matching condition documents.
You need to perform two separate queries for this
take only one item from the matching filters
var item = db.collection.findOne({'condition':'some condition'})
and delete the item by using the id
db.collection.remove({_id: item._id});