string attendlecture = (((Label)row.FindControl("lblattend")).Text);
attendlecture = count.ToString();
You need to appreciate the difference between "value" types and "reference" types. When you load the value of lblAttend into attendlecture that is all you are doing, that variable is not a reference to the lblattent.Text property, it is simply a copy of it, so when you update it you're only overwriting the copy. You need to do this instead
Label lblattend = (Label)row.FindControl("lblattend");
lblattend.Text = count.ToString();