ok, grazie ora funziona.
Però l'esempio è solo per un campo, ma se volessi mettere più campi mi da errore:
ho aggiunto il campo "stato_ordine" oltre al campo "stato_merce"

Codice PHP:
<?php 
.................


$dataArray=array();

$sql="SELECT stato_merce, stato_ordine
    COUNT(*) AS 'count' 
    FROM c_registro_ordini 
    GROUP BY stato_merce"
;
$result mysql_query($sql) or die('Query failed: ' mysql_error());    
if(
$result)
{
    while(
$row mysql_fetch_assoc($result))
    {    
            
$salesgroup=$row["stato_merce"];
            
$count=$row["count"];
                        
//ADD TO ARRAY
            
$dataArray[$salesgroup]=$count;
    }
}
$graph->addData($dataArray);
$graph->setTitle("GRAFICO VENDITE");
$graph->setBarColor("206,0,0");
$graph->setBarOutlineColor("black");
$graph->createGraph();
?>