Air Flow Meters (AFM)

AFM - air-flow meters are the crudest form of sensing devices. It uses a mechanical flapper barn-door that is physically pushed aside by the intake air stream. The volume of this air-flow then determines how much the door opens. The door then is mechanically attached to a variable-resistor assembly that then sends a variable-voltage signal to the computer that roughly correlates to the volume of air flowing past it. However, there are some disadvantages to this method...

Mechanical parts wear out - with age, the pivot on the door can bind, the spring loses tension, the resistor-array wears out.
Flapper door restricts air flow - this is kind of like the Heisenberg-principle of air-flow measurement, where you can't measure something without interfering with it. The spring-loaded door actually contributes to turbo-lag because at low-RPM, low-flow conditions, the door is almost completely closed. Then when you floor it, there's insufficient flow to fully open the door until more air volume is moving past it. But you can't get more air flowing without first getting more air into and out of the engine to build up boost-pressure, so it's a catch-22.
Insufficient range for upgrades - the operating range of output voltages and the volume of air that corresponds to them are fixed by the physical dimensions of the AFM. If you turn up the boost or even get high-flowing modifications like an aftermarket turbo, there can actually be twice as much air flowing as a stock engine. What happens then is the AFM door will be fully wide-open by 4000rpm, and the output air-flow signal will be clipped (fixed) from then on. So the computer thinks air-flow isn't increasing, and puts out a fixed fuel-amount. However, the real air-flow really is increasing and the limited fuel will cause the car to run lean, detonate and blow up.
Inaccurate air measurements - what really matters to the computer, is figuring exactly how many oxygen molecules has been ingested. But the number of molecules for any given volume of air changes depending upon altitude (pressure) and temperature. So additional air-temp. and altitude sensors are necessary to modify the air-flow signal received and compute an air-mass number. Which would then logically match up precisely with a corresponding fuel-mass/volume number for the injectors to meter. Which leads us to the next upgrade...

Mass Air Flow Sensors (MAF)

MAF - mass-air-flow sensors replace the mechanical measurements of the AFM with an electronic version. MAF-sensors use active analogue electronics to measure current flow through a heated wire placed in the air-stream. As air flows past the heated wire, it cools the wire, with more air cooling the wire more. The circuit then pumps more current through the wire to keep its temperature constant, with more current required for more airflow. This current then drives an output voltage to the stock computer. One nice thing about the MAF-sensor over AFM is that air-temperature and pressure compensation is automatically included in the output signal. Denser/cooler air will cool the hot-wire more, and a higher voltage will reach the computer to indicate larger numbers of molecules flowing into the engine. As good as this is, MAF-sensors also brings along with it some of the same drawbacks as AFM-sensors and adds some new ones of its own:

Insufficient range for upgrades - since there are physical dimensions to a MAF-sensor such as diameter and length of wire, the range of air-mass that it can measure is finite. A sensor that's roughly the same size as the stock AFM will measure roughly the same amount of air for the same output voltage ranges. Turning up the boost with a larger turbo will max out a MAF-sensor and it too will send out a clipped fixed signal to the computer. Going overboard to a sizus-maximus MAF-4 sensor to closely match your maximum air-flow with the maximum output-voltage ends up causing low-flow problems. You get an idle that is irregular, stumbles or dies completely. Or the mixture is so rich at idle, you'll never pass emissions; there are people who remove and re-install their MAF kits regularly just to pass emissions!
No ignition-compensation for air-temperatures - while the MAF-sensor may include air-temperature compensation into its air-mass output to the computer, the issue of ignition control is not addressed. MAF kits typically simulate the air-temp signal line to the Motronic DME computer with a fixed voltage, thus fooling the computer into thinking that air-temps are always 60 or 70-degrees. However, the stock computer actually does quite a bit of ignition-timing modifications based upon ambient air-temperatures. In order to operate optimally at the highest levels of performance, ignition must be adjusted for the conditions as well.
Inadequate fine-tuning controls - the output curve of a MAF sensor isn't quite exactly the same as an AFM for the same air-flow patterns. And upgraded cars with increased boost have air-flow patterns that are completely different than stock; typically less flow down low due to increased turbo lag, yet more flow up top. So a way of massaging the MAF-sensor's output is needed to 'fool' the stock computer into injecting an appropriate amount of fuel across the entire RPM-range and load-ranges is needed. Some MAF kits use custom chips to provide this correction. However, unless your car has exactly the same turbo, with exactly the same boost curve and exactly the same intake & exhaust, not to mention internal wear and tear as their model car, your air-fuel mixture most likely won't be ideal. Other MAF kits include a four-knob signal-massager that tries to encompass adjustments across all possible flow & load ranges. This is a valiant effort, but much too coarse to allow tuning a car for maximum performance.