def notify_link_count(doctype, name):
	link_count = frappe.cache().get_value('_link_count')
	if not link_count:
		link_count = {}

	if not (doctype, name) in link_count:
		link_count[(doctype, name)] = 1
	else:
		link_count[(doctype, name)] += 1

	frappe.cache().set_value('_link_count', link_count)
updates link count for given document
dataset/ETHPy150Open frappe/frappe/frappe/model/utils/link_count.py/notify_link_count