Clap Switch using 8051 Microcontroller

I am trying to make a Clap on/off switch using an 8051 microcontroller. I need it to toggle on and off an LED at the sound of two claps. I have an ADC already interfaced with the controller. I need to know how to wire the mic, amplify the input sound and convert it using the ADC. I also need some help writing the assembly code for this project to make sure that it toggles the LED with TWO claps and not one. Any help would be greatly appreciated!