public function valueCount($alias, $field = null, $script = null)
    {
        $aggregation = new ValueCountAggregation($alias, $field, $script);

        $this->append($aggregation);
    }
public function valueCount($alias, $field = null, $script = null)
    {
        $aggregation = new ValueCountAggregation($alias, $field, $script);

        $this->append($aggregation);
    }
public function valueCount ( $ alias , $ field = null , $ script = null ) { $ aggregation = new ValueCountAggregation ( $ alias , $ field , $ script ) ; $ this -> append ( $ aggregation ) ; }
Add a value count aggregate.

@param $alias
@param string      $field
@param string|null $script
Add a value count aggregate .