Filtering and Removing()

For some reason, I would like to perform a filter on items before removing them from the database. My thinking is to loop the items after the filter. Truncate() will not apply since am not trying to remove all the items in the collection. The code below only removes one item instead of all the items. Any help will be appreciated.

async function deleteall(){
        let dealerid=local.getItem("itemId")
  await $w('#dataset14').setFilter( wixData.filter()
  .contains("dealerId",dealerid)
);
let count = $w("#dataset14").getTotalCount(); 

for (let i = 0; i < count; i++) {
$w("#dataset14").remove()
      .then( () => {
        console.log(count)
      } );
    }
          $w("#dataset11").refresh()
          }