Changed getElementCount() to getChildCount().