The code you posted does not count rows, its counting the number of cells in that row that has the EBC value. Is that what you want or is the below accurate?
If your trying to show the rowcount while looping you just increase the rowcount by 1 inside the if statement, and then set the label text to that number as a string. Note the use of .ToString() instead of Convert, though they produce the same result.
int rowCount = 0;
for (int i = 0; i < dataGridView1.Rows.Count; i++){
if(dataGridView1.Rows[i].Cells["Company"].Value == "EBC"){
rowCount++;
label6.Text = rowCount.ToString();
}
}
Otherwise you can do the full looping and checks, incrementing the rowCount and then just set the label once at the end.
int rowCount = 0;
for (int i = 0; i < dataGridView1.Rows.Count; i++){
if(dataGridView1.Rows[i].Cells["Company"].Value == "EBC"){
rowCount++;
}
}
label6.Text = rowCount.ToString();