Does the 3 year statute of limitations to claim an irs refund take into account any extension you filed?
Yes, sort of. Please read the following from the IRS 1040X instructions:
Generally, for a credit or refund, you must file Form 1040X within 3 years (including extensions) after the date you filed your original return or within 2 years after the date you paid the tax, whichever is later. If you filed your original return early (for example, March 1 for a calendar year return), your return is considered filed on the due date (generally April 15). However, if you had an extension to file (for example, until October 15) but you filed earlier and we received it July 1, your return is considered filed on July 1.(see page 3 at https://www.irs.gov/pub/irs-pdf/i1040x.pdf)
So, to be clear, if you filed an extension, and you filed at some point after April 15th (or whatever the exact due date was that year), then the 3-year clock starts ticking on the date that you filed your return in 2015, whether April 16th or July 1st or October 14th.