<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def deleted_count(self):
 """The number of documents deleted."""

        if isinstance(self.raw_result, list):
            return len(self.raw_result)
        else:
            return self.raw_result