//searching and returning number of features where value in 'Class' field in 'city' QueryFilter qf = new QueryFilter() { WhereClause = "Class = 'city'" }; RowCursor rows = aFeatureLayer.Search(qf); int i = 0; while (rows.MoveNext()) i++;