[BUGFIX] Wrong usage of count on SimpleXMLElement

SimpleXMLElement comes with its own count implementation,
so no need to call count() on that Element.
Further I have updated some type annotations.

Resolves: #62130
Releases master,6.2
Change-Id: I2d52d54172d2898a89f0649330dc37ebddfe40c7
Reviewed-on: http://review.typo3.org/33250
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>