@Override
	public PathPattern applyKeys(Align align, List<String> keys) {
		String[] result = new String[pattern.size()];
		ListIterator<String> kit = align.iterator(keys);
		ListIterator<String> pit = align.iterator(pattern.keys);

		while (pit.hasNext()) {
			int i = pit.nextIndex();
			String pat = pit.next();
			if (kit.hasNext() && isWildcard(pat)) {
				String index = kit.next();
				if (KeyPath.isIndex(pat)) {
					result[i] = KeyPath.makeKey(index);
				}
				else {
					// NB. Rare for attribute wildcards, but just in case
					result[i] = index;
				}
			}
			else {
				result[i] = pat;
			}
		}
		return new PathPattern(new KeyPath(result));
	}
Count the number of wildcard keys in this pattern

@return the count
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/target/path/PathPattern.java