def notify_link_count(doctype, name):
 link_count = frappe.cache().get_value(u'_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(u'_link_count', link_count)

def notify_link_count ( doctype , name ) : link_count = frappe . cache ( ) . get_value ( u'_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 ( u'_link_count' , link_count )
updates link count for given document .