size() method for Component that returns the number of children