code: public function errorStats()
      {
          $errors = $this->debug->errorHandler->get('errors');
          $stats = array(
              'inConsole' => 0,
              'inConsoleCategories' => 0,
              'notInConsole' => 0,
              'counts' => array(),
          );
          foreach ($errors as $error) {
              if ($error['isSuppressed']) {
                  continue;
              }
              $category = $error['category'];
              if (!isset($stats['counts'][$category])) {
                  $stats['counts'][$category] = array(
                      'inConsole' => 0,
                      'notInConsole' => 0,
                  );
              }
              $k = $error['inConsole'] ? 'inConsole' : 'notInConsole';
              $stats['counts'][$category][$k]++;
          }
          foreach ($stats['counts'] as $a) {
              $stats['inConsole'] += $a['inConsole'];
              $stats['notInConsole'] += $a['notInConsole'];
              if ($a['inConsole']) {
                  $stats['inConsoleCategories']++;
              }
          }
          $order = array(
              'fatal',
              'error',
              'warning',
              'deprecated',
              'notice',
              'strict',
          );
          $stats['counts'] = \array_intersect_key(\array_merge(\array_flip($order), $stats['counts']), $stats['counts']);
          return $stats;
      }
docs: get error statistics from errorHandler
  how many errors were captured in/out of console
  breakdown per error category
  
  @return array