Add a counter to track flagged mines