public static function count(array $array)
    {
        $count = 0;

        foreach ($array as $v) {
            if (is_array($v)) {
                $count += self::count($v);
            } else {
                $count++;
            }
        }
        
        return $count;
    }