添加flag counter