Pig script to generate basic stats from links data