if you re-arrange your code and start Count at -1you don't have to do Count = Count -1
Dim Labels() As String
Dim Count As Integer = -1
While Not rso.EOF
Count += 1
ReDim Preserve Labels(Count)<br/> rezultatXML = rezultatXML & "<Field>" & rso.Fields("FunctionName") & "</Field>" & vbCrLf <br/>
Labels(Count) = rso.Fields("FunctionName")
rso.MoveNext<br/><br/>
<br/><br/> End While