common/models/resources/Stats.php
public static function getRowCount( $table, $type = 'row' ) {

		$stat = self::find()->where( '`table`=:table AND type=:type', [ ':table' => $table, ':type' => $type ] )->one();

		if( isset( $stat ) ) {

			return $stat->count;
		}

		return 0;
	}
public static function getRowCount( $table, $type = 'row' ) {

		$stat = self::find()->where( '`table`=:table AND type=:type', [ ':table' => $table, ':type' => $type ] )->one();

		if( isset( $stat ) ) {

			return $stat->count;
		}

		return 0;
	}
public static function getRowCount ( $ table , $ type = 'row' ) { $ stat = self :: find ( ) -> where ( '`table`=:table AND type=:type' , [ ':table' => $ table , ':type' => $ type ] ) -> one ( ) ; if ( isset ( $ stat ) ) { return $ stat -> count ; } return 0 ; }
Returns row count for given table and type.

@param string $table
@param string $type
@return integer
Returns row count for given table and type .