code: public static function COUNT(...$args)
      {
          $returnValue = 0;
  
          // Loop through arguments
          $aArgs = Functions::flattenArrayIndexed($args);
          foreach ($aArgs as $k => $arg) {
              if ((is_bool($arg)) &&
                  ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) {
                  $arg = (int) $arg;
              }
              // Is it a numeric value?
              if ((is_numeric($arg)) && (!is_string($arg))) {
                  ++$returnValue;
              }
          }
  
          return $returnValue;
      }
docs: COUNT.
  
  Counts the number of cells that contain numbers within the list of arguments
  
  Excel Function:
  COUNT(value1[,value2[, ...]])
  
  @category Statistical Functions
  
  @param mixed ...$args Data values
  
  @return int