original_string: protected function _getCount(array $config, array $conditions)
      {
          $finder = 'all';
          if (!empty($config['finder'])) {
              $finder = $config['finder'];
              unset($config['finder']);
          }
  
          if (!isset($config['conditions'])) {
              $config['conditions'] = [];
          }
          $config['conditions'] = array_merge($conditions, $config['conditions']);
          $query = $this->_table->find($finder, $config);
  
          return $query->count();
      }
code: protected function _getCount(array $config, array $conditions)
      {
          $finder = 'all';
          if (!empty($config['finder'])) {
              $finder = $config['finder'];
              unset($config['finder']);
          }
  
          if (!isset($config['conditions'])) {
              $config['conditions'] = [];
          }
          $config['conditions'] = array_merge($conditions, $config['conditions']);
          $query = $this->_table->find($finder, $config);
  
          return $query->count();
      }
code_tokens: protected function _getCount ( array $ config , array $ conditions ) { $ finder = 'all' ; if ( ! empty ( $ config [ 'finder' ] ) ) { $ finder = $ config [ 'finder' ] ; unset ( $ config [ 'finder' ] ) ; } if ( ! isset ( $ config [ 'conditions' ] ) ) { $ config [ 'conditions' ] = [ ] ; } $ config [ 'conditions' ] = array_merge ( $ conditions , $ config [ 'conditions' ] ) ; $ query = $ this -> _table -> find ( $ finder , $ config ) ; return $ query -> count ( ) ; }
docstring: Fetches and returns the count for a single field in an association
  
  @param array $config The counter cache configuration for a single field
  @param array $conditions Additional conditions given to the query
  @return int The number of relations matching the given config and conditions
docstring_tokens: Fetches and returns the count for a single field in an association