Check getCount instead of getChildCount.