protected function countBindings(array $where, $type)
    {
        if ($this->isHasWhere($where, $type)) {
            return substr_count($where['column'] . $where['value'], '?');
        } elseif ($type === 'basic') {
            return (int) !$where['value'] instanceof Expression;
        } elseif (in_array($type, ['basic', 'date', 'year', 'month', 'day'])) {
            return (int) !$where['value'] instanceof Expression;
        } elseif (in_array($type, ['null', 'notnull'])) {
            return 0;
        } elseif ($type === 'between') {
            return 2;
        } elseif (in_array($type, ['in', 'notin'])) {
            return count($where['values']);
        } elseif ($type === 'raw') {
            return substr_count($where['sql'], '?');
        } elseif (in_array($type, ['nested', 'sub', 'exists', 'notexists', 'insub', 'notinsub'])) {
            return count($where['query']->getBindings());
        }
    }
protected function countBindings(array $where, $type)
    {
        if ($this->isHasWhere($where, $type)) {
            return substr_count($where['column'] . $where['value'], '?');
        } elseif ($type === 'basic') {
            return (int) !$where['value'] instanceof Expression;
        } elseif (in_array($type, ['basic', 'date', 'year', 'month', 'day'])) {
            return (int) !$where['value'] instanceof Expression;
        } elseif (in_array($type, ['null', 'notnull'])) {
            return 0;
        } elseif ($type === 'between') {
            return 2;
        } elseif (in_array($type, ['in', 'notin'])) {
            return count($where['values']);
        } elseif ($type === 'raw') {
            return substr_count($where['sql'], '?');
        } elseif (in_array($type, ['nested', 'sub', 'exists', 'notexists', 'insub', 'notinsub'])) {
            return count($where['query']->getBindings());
        }
    }
protected function countBindings ( array $ where , $ type ) { if ( $ this -> isHasWhere ( $ where , $ type ) ) { return substr_count ( $ where [ 'column' ] . $ where [ 'value' ] , '?' ) ; } elseif ( $ type === 'basic' ) { return ( int ) ! $ where [ 'value' ] instanceof Expression ; } elseif ( in_array ( $ type , [ 'basic' , 'date' , 'year' , 'month' , 'day' ] ) ) { return ( int ) ! $ where [ 'value' ] instanceof Expression ; } elseif ( in_array ( $ type , [ 'null' , 'notnull' ] ) ) { return 0 ; } elseif ( $ type === 'between' ) { return 2 ; } elseif ( in_array ( $ type , [ 'in' , 'notin' ] ) ) { return count ( $ where [ 'values' ] ) ; } elseif ( $ type === 'raw' ) { return substr_count ( $ where [ 'sql' ] , '?' ) ; } elseif ( in_array ( $ type , [ 'nested' , 'sub' , 'exists' , 'notexists' , 'insub' , 'notinsub' ] ) ) { return count ( $ where [ 'query' ] -> getBindings ( ) ) ; } }
Get number of bindings provided for a where clause.

@param  array   $where
@param  string  $type
@return integer
Get number of bindings provided for a where clause .