private String getXRefHeaderString(Object obj) {
		if (obj == null || !(obj instanceof Variable)) {
			return null;
		}
		Variable var = (Variable) obj;

		int xrefCount = 0;
		int offcutCount = 0;
		Varnode varnode = var.getFirstStorageVarnode();
		if (varnode == null) {
			return null;
		}
		Address varAddr = varnode.getAddress();
		Program program = var.getFunction().getProgram();
		ReferenceManager refMgr = program.getReferenceManager();
		Reference[] vrefs = refMgr.getReferencesTo(var);
		for (Reference vref : vrefs) {
			if (vref.getToAddress().equals(varAddr)) {
				xrefCount++;
			}
			else {
				offcutCount++;
			}
		}

		if (xrefCount > 0 || offcutCount > 0) {
			if (offcutCount > 0) {
				return "XREF[" + xrefCount + "," + offcutCount + "]:";
			}
			return "XREF[" + xrefCount + "]:";
		}
		return null;
	}
Creates a field with "XREF[m,n]:"
<br>
Where:<br>
     m is the number of cross references <br>
     n is the number of off-cut cross references <br><br>
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/VariableXRefHeaderFieldFactory.java