How often do pilots fly drunk?
Its rare but it does happen. You can search the NTSB database here, the phrase "positive for alcohol" yields the best results as toxicology is fairly common in an accident so a lot of reports include "negative for alcohol" making "alcohol" alone a bad search term. I was able to find a few examples here, here, here, and here as well as some more report results.

according to this article 


  ... Of over 10,000 pilots randomly tested for alcohol in 2010, only 12
  failed the test.


They don't cite any sources though. 

This looks like it might be the original study and has slightly different numbers but this seems to include all "Aviation Employees" so pilots, crew, ATC and the related may have been included. 


  Validity of Suspected Alcohol and Drug Violations in Aviation Employees
  
  Results: 
  During the 11-year study period, a total of 2,284 alcohol tests and
  2,015 drug tests were performed under the reasonable-cause testing
  program. The PPV was 37.7% [95% confidence interval (CI), 35.7–39.7%]
  for suspected alcohol violations and 12.6% (95% CI, 11.2–14.1%) for
  suspected drug violations. Random testing revealed an overall
  prevalence of 0.09% (601/649,796) for alcohol violations and 0.6%
  (7,211/1,130,922) for drug violations. The LR+ was 653.6 (95% CI,
  581.7–734.3) for suspected alcohol violations and 22.5 (95% CI, 19.6–25.7) for suspected drug violations.


The FAA also has an interesting fact sheet you can find here quoting some accident numbers from the late 80's and early 90's as well as the pilots BAC. 

Its worth noting that the regulations have changed a fair bit over the years. The current regulation for this is FAR 91.17 which establishes an 8 hour "bottle to throttle" time frame as well as a maximum .04 BAC. 


  § 91.17 Alcohol or drugs.
  
  (1) Within 8 hours after the consumption of any alcoholic beverage;
  
  (2) While under the influence of alcohol;
  
  (3) While using any drug that affects the person's faculties in any
  way contrary to safety; or
  
  (4) While having an alcohol concentration of 0.04 or greater in a
  blood or breath specimen. Alcohol concentration means grams of alcohol
  per deciliter of blood or grams of alcohol per 210 liters of breath.


If you take a look at the original amendment creating 91.17 it reads  


  Sec. 91.17 Liquor and drugs. 
  (a) No person may act as a crewmember of a civil aircraft -  
  
  (1) Within 8 hours after the consumption of any alcoholic beverage; 
  
  (2) While under the influence of alcohol; or 
  
  (3) While using any drug that affects his or her faculties in any way contrary to safety.


the important difference being that it does not establish a maximum BAC but leaves it open to the interpretation of "under the influence" which potentially left room for intoxicated pilots prior to the current verbiage.