private function getFacetSize()
{
$attribute = $this->getAttributeModel();
$size = (int) $attribute->getFacetMaxSize();
$hasValue = !empty($this->currentFilterValue);
$isManualOrder = $attribute->getFacetSortOrder() == BucketInterface::SORT_ORDER_MANUAL;
if ($hasValue || $isManualOrder) {
$size = 0;
}
return $size;
}