def _selectCountCallback(self, data, select_expression=None, 
            previous_count=0,
            total_box_usage=0):
        xml = ET.fromstring(data["response"])
        box_usage = float(xml.find(".//%sBoxUsage" % SDB_NAMESPACE).text)
        self.box_usage += box_usage
        total_box_usage += box_usage
        next_token_element = xml.find(".//%sNextToken" % SDB_NAMESPACE)
        if next_token_element is not None:
            next_token = next_token_element.text
        else:
            next_token = None
        count = previous_count + int(xml.find(".//%sValue" % SDB_NAMESPACE).text)
        if next_token is not None:
            return self._selectCount(select_expression, next_token=next_token,
                previous_count=count,
                total_box_usage=total_box_usage)
        LOGGER.debug("""Select:\n'%s'\nBox usage: %s""" % (
            select_expression,
            total_box_usage))
        return count
dataset/ETHPy150Open wehriam/awspider/awspider/aws/sdb.py/AmazonSDB._selectCountCallback/original