Changed getChildCount to getElementCount