Added CountElements for counting array children