flag count is initialized to -9