[BUGFIX] Fix incorrect call to substr_count

The call to substr_count was incorrect.

Change-Id: I9f452d22f03a99fbf0b862021b100dcf6d53d792
Resolves: #51409
Releases: 6.2
Reviewed-on: https://review.typo3.org/23374
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind