@Override
	public Integer getValue(Address rowObject, Settings settings, Program pgm,
			ServiceProvider serviceProvider) throws IllegalArgumentException {
		ReferenceManager referenceManager = pgm.getReferenceManager();
		int referenceCount = referenceManager.getReferenceCountTo(rowObject);
		if (referenceCount != 0) {
			return referenceCount;
		}

		// get the function containing the address and show the number of references to that
		FunctionManager functionManager = pgm.getFunctionManager();
		Function function = functionManager.getFunctionContaining(rowObject);
		if (function == null) {
			return 0;
		}
		return referenceManager.getReferenceCountTo(function.getEntryPoint());
	}
This table field displays the number of references to the location that was found
Ghidra/Features/Base/src/main/java/ghidra/util/table/field/ReferenceCountToAddressTableColumn.java