original_string: public function countDataItems( $id = null, $attributes = array() )
      {
          $sum = 0;
          foreach( $this->storageStack as $storageConf )
          {
              $sum += $storageConf->storage->countDataItems( $id, $attributes );
          }
          return $sum;
      }
code: public function countDataItems( $id = null, $attributes = array() )
      {
          $sum = 0;
          foreach( $this->storageStack as $storageConf )
          {
              $sum += $storageConf->storage->countDataItems( $id, $attributes );
          }
          return $sum;
      }
code_tokens: public function countDataItems ( $ id = null , $ attributes = array ( ) ) { $ sum = 0 ; foreach ( $ this -> storageStack as $ storageConf ) { $ sum += $ storageConf -> storage -> countDataItems ( $ id , $ attributes ) ; } return $ sum ; }
docstring: Counts how many items are stored, fulfilling certain criteria.
  
  This method counts how many data items fulfilling the given criteria are
  stored overall. Note: The items of all contained storages are counted
  independantly and summarized.
  
  @param string $id
  @param array $attributes
  @return int
docstring_tokens: Counts how many items are stored fulfilling certain criteria .