Apache Pig COUNT Function
The Apache Pig COUNT function is used to count the number of elements in a bag. It requires a preceding GROUP ALL statement for global counts and a GROUP BY statement for group counts. It ignores the null values.
Example of COUNT Function
In this example, we count the tuples in the bag.
Steps to execute COUNT Function
Here, we got the desired output.