<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def count_items(self, unique=True):
 """Count items in the cart. Parameters unique : bool-convertible, optional Returns ------- int If `unique` is truthy, then the result is the number of items in the cart. Otherwise, it's the sum of all item quantities. """

        if unique:
            return len(self.items)
        return sum([item.quantity for item in self.items.values()])