title: instruction count in assembly code with loop
body: <p>I have a piece of (assembly) code, in which i want to count the number of dynamic instructions</p>
  
  <pre><code>a1=99
  
  Loop:
  a1=a1-1
  branch a1&gt;0, Loop
  halt
  </code></pre>
  
  <p>I think the instructions in loop are executing for 100 times. So I guess the number of dynamic instructions in the code are 102. But I am not sure, whether or not we also consider branch instructions as dynamic? In that case, shouldn't I have double instruction count? Thanks in advance to anybody who is willing to help.</p>