Returns the number of batches the batched sequence contains.

        :rtype: integer.

def number(self):
        """
        Returns the number of batches the batched sequence contains.

        :rtype: integer.
        """
        return int(math.ceil(self.total_size / float(self.size)))