int numChildren = 0; foreach (ch; &parent.children) { ++numChildren; }