Revolutions control in motor

Hello everyone,

I have a problem with counting difference between revolutions of pulleys. They are powered by one motor, 2nd pulley is drive by the 1st one, and I need to count the revolutions difference then the 1st pulley reaches 100 revolutions. The difference JUST at that moment! Everything must be done with INSTRUCTION LIST, and how to load a signal in IL that only when CTU of 1st pulleys Q gives 1, I could take the difference between 2nd and 1st? To make it easier to understand what I am talking about, I give my FBD program in here: