I did something like this to count the number of rows in an alias in PIG:
logs = LOAD \'log\' logs_w_one = foreach logs generate 1 as one; logs_group = group
Be careful, with COUNT your first item in the bag must not be null. Else you can use the function COUNT_STAR to count all rows.
COUNT
COUNT_STAR