@Override
	public Integer getValue(Address address, Settings settings, Program program,
			ServiceProvider serviceProvider) throws IllegalArgumentException {
		int count = 0;
		if (address.isMemoryAddress()) {
			CodeUnit codeUnit = program.getListing().getCodeUnitContaining(address);
			if (codeUnit != null) {
				AddressSet set =
					new AddressSet(codeUnit.getMinAddress(), codeUnit.getMaxAddress());
				set.deleteRange(address, address);
				ReferenceManager referenceManager = program.getReferenceManager();
				AddressIterator it = referenceManager.getReferenceDestinationIterator(set, true);
				while (it.hasNext()) {
					it.next();
					count++;
				}
			}
		}
		return Integer.valueOf(count);
	}
This table field displays the number of references to the location that was found
Ghidra/Features/Base/src/main/java/ghidra/util/table/field/OffcutReferenceCountToAddressTableColumn.java