public default long getAddressCountBefore(Address address) {
		long count = 0;
		for (AddressRange range : getAddressRanges()) {
			if (range.getMinAddress().compareTo(address) > 0) {
				return count;
			}
			else if (range.contains(address)) {
				count += address.subtract(range.getMinAddress());
				return count;
			}
			count += range.getLength();
		}
		return count;
	}
Returns the number of address in this address set before the given address.

@param address the address after the last address to be counted
@return the number of address in this address set before the given address
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressSetView.java