How can count Ordersymbol() ?

 

I want count  Ordersymbol().

 

How can write it ?

 This count only order.

 Example :

BUY : EURUSD 2 order

SELL : GBPUSD 1 order

SELL : USDJPY  1 order

Count Ordersymbol = 3

int CountSym()
   {
   int count=0;
   int i,mm;
   int total=OrdersTotal();
   for(i=0;i<total;i++)
   {
   OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
 
    if (OrderSymbol() != Symbol()) continue;
   
   count++;
   
   }
   return(count);
   }