[PHP 7.2] My fix for «Warning: count(): Parameter must be an array or an object that implements Countable in lib/internal/Magento/Framework/View/Design/Theme/ThemeList.php on line 237»

The «Changelog» section of the PHP count() function specification says:

Version Description
7.2.0 count() will now yield a warning on invalid countable types passed to the array_or_countable parameter.

http://php.net/manual/en/function.count.php#refsect1-function.count-changelog