public int getNumSelectedComponentRows() {
		int numComponents = getNumComponents();
		int count = 0;
		for (FieldRange range : this.selection) {
			int endIndex = Math.min(range.getEnd().getIndex().intValue(), numComponents);
			int startIndex = range.getStart().getIndex().intValue();
			int rangeCount = endIndex - startIndex;
			if (rangeCount > 0) {
				count += rangeCount;
			}
		}
		return count;
	}
Returns the number of component rows currently selected.

<p>Note: This only includes rows that are actually components.

@return the selected row count
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompositeViewerModel.java