title: SQL counter variable @Count += 1
body: <p>I would like to know if it's possible to create a Count variable like you would in C#.</p>
  
  <pre><code>DECLARE @Count Int
  SET @Count = 0
  
  --something happens
  SET @Count += 1
  
  --something happens
  SET @Count += 1
  
  IF @Count &lt; 3
  BEGIN
  --Do something
  END
  </code></pre>