script to check popularity in last N months