activity_count in teradata