Dynamics CRM 2016 Plugin Global Variables
<p>I am simply incrementing a static global variable in a Dynamics CRM 2016 plugin and it shows strange random pattern as shown below. Why does it show strange behavior and pattern?</p>

<p><a href="https://i.stack.imgur.com/MXDf0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MXDf0.png" alt="Log image"></a></p>

<p>Below is the code I am using.</p>

<pre><code> public class MyPlugin : IPlugin
{
    private static int count = 0;

    public void Execute(IServiceProvider serviceProvider)
    {

        try
        {
          if (_objContext.InputParameters.Contains("Target") &amp;&amp;     _objContext.InputParameters["Target"] is Entity)
            {
                WriteLog("Count value before increament: " + count,  service);
                count = count + 1;
                WriteLog("Count value after increament: "+count, service);
             }
         }
     }
  }
</code></pre>