public function count($property = null) {
		if ($property === null) {
			return count($this->_map);
		}
		
		if (is_array($property)) {
			$reduceFunction = function(&$result, &$item) use($property) {
				foreach ($property as $part) {
					if (! isset($item[$part])) {
						return;
					}
				}
				
				return $result + 1;
			};
		} else {
			$reduceFunction = function(&$result, &$item) use($property) {
				if (isset($item[$property])) {
					return $result + 1;
				};
			};
		}
		
		return (int) array_reduce($this->_data, $reduceFunction, 0);
	}
public function count($property = null) {
		if ($property === null) {
			return count($this->_map);
		}
		
		if (is_array($property)) {
			$reduceFunction = function(&$result, &$item) use($property) {
				foreach ($property as $part) {
					if (! isset($item[$part])) {
						return;
					}
				}
				
				return $result + 1;
			};
		} else {
			$reduceFunction = function(&$result, &$item) use($property) {
				if (isset($item[$property])) {
					return $result + 1;
				};
			};
		}
		
		return (int) array_reduce($this->_data, $reduceFunction, 0);
	}
public function count ( $ property = null ) { if ( $ property === null ) { return count ( $ this -> _map ) ; } if ( is_array ( $ property ) ) { $ reduceFunction = function ( & $ result , & $ item ) use ( $ property ) { foreach ( $ property as $ part ) { if ( ! isset ( $ item [ $ part ] ) ) { return ; } } return $ result + 1 ; } ; } else { $ reduceFunction = function ( & $ result , & $ item ) use ( $ property ) { if ( isset ( $ item [ $ property ] ) ) { return $ result + 1 ; } ; } ; } return ( int ) array_reduce ( $ this -> _data , $ reduceFunction , 0 ) ; }
Count number of items

@param  int | array count by property(ies)
@return int
Count number of items