Count termination signals.

This patch changes the should_terimate field from
a boolean to a counter (terminate_counter). The
terminate signal will now only be acted upon when
terminate_counter == the number of a nodes inbound
edges (and all inbound tokens have been consumed).