Why not use multilink or counters to help you?

Can you find an efficient way to record what happens?