def count_items(self, unique=True):
if unique:<EOL><INDENT>return len(self.items)<EOL><DEDENT>return sum([item.quantity for item in self.items.values()])<EOL>
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.