check number of archives to delete before calling that function