substitute '%s' in the string " (%s squashed migrations)" with length of replaces filed of graph.nodes element at the plan_node index, append the string to the title.
title += " (%s squashed migrations)" % len ( graph . nodes [ plan_node ] . replaces )