How can I create a block that shows the total items in my cart?
You can test this one -

Put below code in your page (create new page content) and select input format "php" and hit preview button you will get what you want (if cart is not empty).

&lt;?php
        $items = uc_cart_get_contents();

        foreach($items as $item){
            while(list($key,$value) = each($item)){     
                if($key == 'qty')$qty = $value;
                if($key == 'price')$price = $value;
            }       
            $total_qty += $qty;
            $total_price += $qty*$price;
       }
       echo 'Total Quantity : '.$total_qty.' Total Price : '.uc_currency_format($total_price);
    ?&gt;