I am trying to make a tile based game where tiles are filled with random colors and if the user clicks on a tile it disappears. This I have already accomplished.

Now, what I want to do is the tile disappears only if 2 or more adjacent tiles have the same color. I have used the flood fill algorithm to destroy tiles. How do I modify this code so that it works only if some count value is greater than 2.
This is the code that destroys a tile :
private void Destroy(int x,int y,int old_Value,int new_Value)
{
if (GameArr[x,y].BlockValue == old_Value)
{
//if some count > 2 then only
GameArr[x, y].BlockValue = 0;
Destroy(x + 1, y, old_Value, new_Value);
Destroy(x - 1, y, old_Value, new_Value);
Destroy(x, y + 1, old_Value, new_Value);
Destroy(x, y - 1, old_Value, new_Value);
}
}
How do I get this count value?
- If I pass a count variable in the method itself and check if value exceeds 2 and then destroy, it won't destroy the first two tiles.
- If I make another method to check if tiles are destroyable, it would set the blockValues to 0 while counting.
How do I go about doing this. Any help would be appreciated.