Hey guys and gals...
I think I might be able to help...well hopefully anyways.
I too had this problem quite a bit but it seems to have remedied itself somehow. Anyhow when you connect your iP4 to Windows it will have to update the drivers and that usually takes a couple minutes or so (if it does need to update, you'll see a little icon in the bottom right corner of the screen)....When Windows recognizes your iPhone but iTunes doesn't just unplug the cord from the iPhone and plug it back in...it might take a couple tries but usually will work after that. Another trick I've learned is, if after plugging it in and out a couple times doesn't seem to work plug it in, wait a few seconds and then press the home button and slide to unlock, then you should hear the beep that confirms it's connected to iTunes.
Also if all else fails, and you can connect to windows but not iTunes...then go into Control Panel, System, Hardware Devices and look for anything related to the iPhone in there and tweak/play around....That totally fixed my problem with connecting to my PC at work that's on XP
Good luck, and if this works for you please let me know.
Thanks.