Turn off your iTunes software, and turning it back on. Try to sync again.
If there is a new version of iTunes, you should install it. Many iTunes problems disappear once the program is updated.
If the previous solution did not help, uninstall the software from your computer completely, because all the possible corrupted files will be deleted. Once you do so, download and install the latest version.
Many people think that restart won’t make any difference. However, it is very useful, and it solves many issues and bugs with ease. When you restart your iPhone and computer, maybe the bugs will be gone. Since it is simple, you should try it.
When it comes to factory settings, before you actually start with it, make sure to back up the files from your device first. When you are done, you can proceed. Navigate to Settings, General, Reset, and choose the option: Reset all Settings. After several minutes, when the task is done, set up your iPhone 4 as a new device.