Add triangle linear counter logic.