The answer to all of your questions is no.
No, the number of files in any given directory will have no impact on the rate of corruption. No, JPEG files (or any other digital image format) do not degrade over time. Finally, no, defragmenting will not cause corruption on its own, though it can help it spread.
To expand a bit on that last point... Assuming you have a bad sector or two on your HDD, which seems to be the most plausible scenario to me given what you've said, any data written to those bad sectors is likely going to be stored incorrectly. Since we're dealing with physical locations on the drive itself, and defragmenting moves files around, it's possible that defragmenting will cause parts of more files to be stored in these bad sectors and thus become corrupted.
It sounds to me like you've just got a bad HDD. It's also possible that you just have a corrupt filesystem, and formatting would fix it, but filesystem corruption tends to spread rapidly, so if your system hasn't melted down already, it points more to a bad HDD in my book.
If the drive is still under warranty, you can make a claim on it, or you could just go out and buy a new drive. It's up to you how much of a hassle you're willing to deal with.
Hello fellow techies
I came to think i was pretty well rounded with pcs, how to use them, repair and technical, but i just came across something that been bugging me terribly. Im running winxp sp2, skt am2 amd64 4600x2, 1gig corsair ddr2 ram, 160gig seagate sata2 Hdd . Specs aside . . . here is my problem . . . im part of a digital arts community, where we share and edit artwork regularly. . . ok so the number of files i have stored in my main folder is quite large. ( 2200 files estimated, ranging about 400mb in size, jpeg format ) Lately i have been noticing that out of random my pictures are starting to become corrupted, sometimes it would be one or two files that are getting corrupted and other times it can be as much as 15 files. By corrupted i mean they can/cant be loaded, when they do load there is color distortion, or the image is missing sections. Basically both render the image useless. What im trying to figure out is: 1 is there a limit to how many files are staored in one folder, because if i cut the folders in half i dont have the problems as often, but that leads to storage and backup issues. 2 jpegs over time tend to loose their data integrity and become corrupt. 3 the regular defragmenting of my pc could possibly be damaging the files directly. ( pc defragmented once every 6 weeks, but then why is it only happening to image files and nothing else ) 4 i meed to stop using the thumbnail veiw in windows explorer for folders with such a large amount of files. Basically i would like to know is it something im doing or is jpeg a bad storage format for a large amount of files. My gif images and or tiff, aswell as other image formats do not have this problem its just jpegs. Also . . i have the folder in its netirety backed up on an external hard disk which is backed up weekly, but not defragmented as much, the backup is only one way too. internal hdd-->extnernal hdd Just as the files are being damaged on the internals hdds archive, they are also turning up damaged on the externals archive. At times the files are exactly the same or the files are different but it happens. If anyone has an idea or came into similar circumstances please let me know. This has set me back quite a few times while i have been working on a picture that was commissioned or needed to be returned. And its turning out to be rather troublesome now. Thank you for yer help all. n.n