PHP count() Function
This method counts the number of children of an element.
public int SimpleXMLElement::count ( void )
The count() function returns the number of elements in an array.
Example -
Return Values
Returns the number of elements of an element.