The use of function sizeof() is forbidden; use count() instead

From phpcs

Change-Id: I919c8af46a722cd1c14bb8c134400e2ec51160d1