I think I understand the basics of capacitive touch screen, i.e. when one or more fingers touches the panel it creates a potential difference at that location drawing current. But how do you go about locating the position of contact? From what I have gathered, there are wires thinner than human hair that forms a grid on the panel. I was looking at the wiring grid on my keyboard recently, and considering the accuracy of the touch screen on my phone there must be thousands of these wires for both x and y. But obviously ICs only have so many input pins. So how does it work?
A capacitive touch screen measures capacity/resonant frequency of "flat plate" senslrs spread across the screen. Your finger touching the screen actually doesn't cause current to flow (that would be a resistive touch screen), but changes the capacitance between 2 microscopic plates.
There are many thousands (actually, several millions on modern displays) of capacitive sensors on each screen. To handle all of those wires, there is a separate MCU (processor) that is part of the 'touch sensor device.' That MCU goes through and checks each 'cell'/'element' in series, then sends information on which one(s) are being 'touched' out on a (usually) serial interface, with several dozen, to a few thousand, updates per second.
See the Wikipedia Article, and related links from that article, for further reading/information.
This company design ICs for large screen solution, but the principle is very similar for small screen, except that the patterns are indeed smaller. Please have a look to one of their CTS 120 solution for screen size betweeen 20" and 46". You would see on page 2 that there isn't thousands of lines, but only dozens.
So, that's why I found you question interesting. In an other example for 20" with 64 x 36 grid, the capacitive grid sensor capture such images: Image with two hands on the screen. You see? Once you got this kind of images, the image processing engine embedded in the ICs uses a lot of algorithms (filter, centroid detection) to extract the finger exact coordinates X and Y, which would be a floating number between 0 and 1. (0,0) represents a corner of the screen and (1,1) the opposite corner of course. Then, it adapts to all possible display screen resolution.