Get total number of items in the basket

def total_items(self, request):
        """
        Get total number of items in the basket
        """
        n_total = 0
        for item in self.get_queryset(request):
            n_total += item.quantity

        return Response(data={"quantity": n_total}, status=status.HTTP_200_OK)