<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scanned(self):
 """Number of items that DynamoDB evaluated, before any filter was applied."""

        if self.request["Select"] == "COUNT":
            while not self.exhausted:
                next(self, None)
        return self._scanned