Gets the line count of the CSV file

@param fval
name of the file
@return int value with count
194109
public static Value flinecount(Value fval)
	{
		ValueList result = new ValueList();

		try
		{
			File file = getFile(fval);
			long count = getLineCount(file);

			result.add(new BooleanValue(true));
			result.add(new IntegerValue(count));
		} catch (Exception e)
		{
			lastError = e.toString();
			result = new ValueList();
			result.add(new BooleanValue(false));
			result.add(new NilValue());
		}

		return new TupleValue(result);
	}
1265941
int getSeparatorCount() {
    	int s = 0;
    	PdfChunk ck;
        for (Iterator i = line.iterator(); i.hasNext(); ) {
        	ck = (PdfChunk)i.next();
        	if (ck.isTab()) {
        		return 0;
        	}
        	if (ck.isHorizontalSeparator()) {
        		s++;
        	}
        }
        return s;
    }
1257838
protected function _getCsvFirstRow()
    {
        $sPath = $this->_getUploadedCsvFilePath();
        $iMaxLineLength = 8192;

        //getting first row
        if (($rFile = @fopen($sPath, "r")) !== false) {
            $aRow = fgetcsv($rFile, $iMaxLineLength, $this->_getCsvFieldsTerminator(), $this->_getCsvFieldsEncolser());
            fclose($rFile);
        }

        return $aRow;
    }
1202457
public function count(): int
    {
        if ($this->count == null) {
            $this->count = 0;

            if ($handle = opendir($this->fileInfo->getAbsoluteFilePath())) {
                while (($file = readdir($handle)) !== false) {
                    if (!in_array($file, array('.', '..'))) {
                        $this->count++;
                    }
                }

                closedir($handle);
            }
        }

        return $this->count;
    }
690518
function getValueCount( $val )
    {
        $val_cnt = false;

        if ( $val === null )
        {
            $val_cnt = 0;
        }
        else if ( $val === true || $val === false )
        {
            $val_cnt = (int)$val;
        }
        else if ( is_array( $val ) )
        {
            $val_cnt = count( $val );
        }
        else if ( is_object( $val ) and
                  method_exists( $val, "attributes" ) )
        {
            $val_cnt = count( $val->attributes() );
        }
        else if ( is_numeric( $val ) )
        {
            $val_cnt = $val;
        }
        else if ( is_string( $val ) )
        {
            $val_cnt = strlen( $val );
        }
        return $val_cnt;
    }
1196882
protected function getFileCount($resultsCount, $maxLinesInFile, $fileCounter)
    {
        $leftToInsert = $resultsCount - ($fileCounter * $maxLinesInFile);
        if ($leftToInsert <= $maxLinesInFile) {
            $count = $leftToInsert;
        } else {
            $count = $maxLinesInFile;
        }

        return $count;
    }
107662
function count()
    {
        try {
            $this->client->getProfile()->defineCommand('count', 'CountScriptCommand');
            return $this->client->count($this->_getPrefix().'*');
        } catch (\Exception $e) {
            throw new exReadError($e->getMessage(), $e->getCode(), $e);
        }
    }
637942
public function count()
    {
        if ($this->_count !== null) {
            return $this->_count;
        }
        if ($this->_statement) {
            return $this->_count = $this->_statement->rowCount();
        }

        if ($this->_results instanceof SplFixedArray) {
            $this->_count = $this->_results->count();
        } else {
            $this->_count = count($this->_results);
        }

        return $this->_count;
    }
1105215
public function count()
    {
        $handle = $this->createHandle($this->getFilePath());
        $lineCount = 0;

        while (!feof($handle)) {
            $line = $this->readLine($handle, null);
            if ($line !== '') {
                ++$lineCount;
            }
        }

        fclose($handle);

        return $lineCount;
    }
1145603
protected function getCsvRow($fh)
    {
        if (version_compare(PHP_VERSION, '5.3.0', '>')) {
            $rows = fgetcsv($fh, NULL, $this->delimiter, $this->enclosure, $this->escape);
        } else {
            $rows = fgetcsv($fh, NULL, $this->delimiter, $this->enclosure);
        }

        if ($rows === false) {
            return false;
        }

        for ($i = 0; $i < $this->ignoreColumnCount; $i++) {
            array_shift($rows);
        }
        return $rows;
    }
117536
public int count(double val) {
        int count = 0;
        for (int i=0; i<this.size(); i++) {
            if (this.getValue(i) == val) {
                count++;
            }
        }
        return count;
    }
1116010
public function countIssues(): int
    {
        $count = 0;
        foreach ($this->files as $file) {
            $count += count($file->getIssues());
        }
        return $count;
    }
117239
public static int getNumberOfColumnsInFile(String filename, String delimiter) {
    try {
      BufferedReader in = new BufferedReader(new FileReader(filename));
      String line;
      while ((line = in.readLine()) != null) {
        String[] parts = line.split(delimiter);
        in.close();
        return parts.length;
      }
      in.close();
      // File is empty.
      return 0;
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
677949
public static int getLineNumber(String text, int posChar) {

	int len = Math.min(posChar, text.length());
	int result = 1;

	for (int i = 0; i < len; i++) {

	    if (text.charAt(i) == '\n') result++;
	}

	return result;
    }
1062304
public static Value freadval(Value fval, Context ctxt)
	{
		ValueList result = new ValueList();

		try
		{
			File file = getFile(fval);

			LexTokenReader ltr = new LexTokenReader(file, Dialect.VDM_PP, VDMJ.filecharset);
			ExpressionReader reader = new ExpressionReader(ltr);
			reader.setCurrentModule("IO");
			PExp exp = reader.readExpression();

			Interpreter ip = Interpreter.getInstance();
			ip.typeCheck(exp, ip.getGlobalEnvironment());
			result.add(new BooleanValue(true));
			result.add(exp.apply(VdmRuntime.getExpressionEvaluator(), ctxt));
		} catch (Exception e)
		{
			lastError = e.toString();
			result = new ValueList();
			result.add(new BooleanValue(false));
			result.add(new NilValue());
		}

		return new TupleValue(result);
	}
119440
function lineCount(value) {
        var rows = 0;
        if (value) {
            rows = 1;
            value.toString().each(/\n/, function () { return rows++; });
        }
        return rows;
    }
190456
public int GetLineLengthUtf32() {
        int total = 0;
        for (Iterator i = line.iterator(); i.hasNext();) {
            total += ((PdfChunk)i.next()).lengthUtf32();
        }
        return total;
    }