title: Want a javascript function to run every minute, but max 3 times
body: <p>I have a ajax javascript method that pulls data from a page etc.</p>
  
  <p>I want this process to run on a timed interval, say every minute.
  But I don't want it to loop forever, so max out at 3 times.</p>
  
  <p>What is the best way to implement this?</p>