[PHP 7.2] My fix for «Warning: count(): Parameter must be an array or an object that implements Countable in Magento/Backend/Block/Menu.php on line 390»

It is similar to:

My fix

Step 1

Replace the line:

with the following one:

if ($colBrakes && count($colBrakes) && $colBrakes[$itemPosition]['colbrake'] && $itemPosition != 1) {

Step 2

Replace the line:

with the following one:

if ($colBrakes && count($colBrakes) && $limit) {