private boolean isSelectionSizeValid(ProgramSelection selection) {
		int numInstructionsInSelection =
			getNumInstructionsInSelection(getCurrentProgram(), selection);

		return numInstructionsInSelection <= MAX_SELECTION_SIZE;
	}
Returns true if the number of instructions selected is less or equal to
MAX_SELECTION_SIZE.

@param selection the program selection
@return true if the selection size is valid
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/InstructionSearchPlugin.java