private function countLogs($installed = true, $upcoming = false, $search = null)
	{
		$total     = 0;
		$countArgs = array('--count');

		if (isset($search))
		{
			$countArgs[] = '-i';
			$countArgs[] = '--grep=' . escapeshellarg($search);
		}

		if ($installed)
		{
			$installedArgs = $countArgs;
			array_unshift($installedArgs, 'HEAD');
			$total = $this->call('rev-list', $installedArgs);
			$total = trim($total);
		}

		if ($upcoming)
		{
			$upcomingArgs = $countArgs;
			array_unshift($upcomingArgs, "HEAD..{$this->upstream}");
			$upcomingTotal = $this->call('rev-list', $upcomingArgs);
			$upcomingTotal = trim($upcomingTotal);
			$total += $upcomingTotal;
		}

		return trim($total);
	}
private function countLogs($installed = true, $upcoming = false, $search = null)
	{
		$total     = 0;
		$countArgs = array('--count');

		if (isset($search))
		{
			$countArgs[] = '-i';
			$countArgs[] = '--grep=' . escapeshellarg($search);
		}

		if ($installed)
		{
			$installedArgs = $countArgs;
			array_unshift($installedArgs, 'HEAD');
			$total = $this->call('rev-list', $installedArgs);
			$total = trim($total);
		}

		if ($upcoming)
		{
			$upcomingArgs = $countArgs;
			array_unshift($upcomingArgs, "HEAD..{$this->upstream}");
			$upcomingTotal = $this->call('rev-list', $upcomingArgs);
			$upcomingTotal = trim($upcomingTotal);
			$total += $upcomingTotal;
		}

		return trim($total);
	}
private function countLogs ( $ installed = true , $ upcoming = false , $ search = null ) { $ total = 0 ; $ countArgs = array ( '--count' ) ; if ( isset ( $ search ) ) { $ countArgs [ ] = '-i' ; $ countArgs [ ] = '--grep=' . escapeshellarg ( $ search ) ; } if ( $ installed ) { $ installedArgs = $ countArgs ; array_unshift ( $ installedArgs , 'HEAD' ) ; $ total = $ this -> call ( 'rev-list' , $ installedArgs ) ; $ total = trim ( $ total ) ; } if ( $ upcoming ) { $ upcomingArgs = $ countArgs ; array_unshift ( $ upcomingArgs , "HEAD..{$this->upstream}" ) ; $ upcomingTotal = $ this -> call ( 'rev-list' , $ upcomingArgs ) ; $ upcomingTotal = trim ( $ upcomingTotal ) ; $ total += $ upcomingTotal ; } return trim ( $ total ) ; }
Count log entries

@param   bool    $installed  Whether or not to include installed entries
@param   bool    $upcoming   Whether or not to include upcoming entries
@param   string  $search     A search filter to apply
@return  int
Count log entries