Have you seen this documentation and blog?
http://squarecog.wordpress.com/2010/05/11/group-operator-in-apache-pig/
http://pig.apache.org/docs/r0.9.2/func.html#count

They explain this in detail.

Regards,
Shahab
On Mon, Jul 21, 2014 at 8:44 AM, Ashish Dobhal <[EMAIL PROTECTED]>
wrote:
 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB