Strange Thunderbird inbox

My inbox in Thunderbird suddenly contains about 29 000 messages, but there were only 20 there when I open it. I tried compacting it to no avail. It seems like all messages, including deleted ones are included. I checked it's size and inbox size is about 75 k and inbox.msf is 5 k. So I moved the 20 files to other folders. Then I deleted the inbox.msf file. No result.
Thunderbird seems to work normally, though. It is a pop3 account. What can I do short of uninstalling T-bird and reinstalling it?

Tanks for your advice. It did now work. But tried another method. I made a backup copy of the inbox file and then opened the original one with Notepad and deleted all the text in it and saved it. Then I restarted T-bird and the inbox was back empty. But, this might be a temporary solution. I still do not understand why the inbox was shown with about 30000 messages. There were only about 200 messages shown in the file. It might happen again. Is there som kind of size limit in Thunderbird? So I may be tack.

The Inbox probably showed it had 30000 messages most likely as it was never (or not recently) compacted.

After you delete messages 'compact' your folders, as those messages are only marked for deletion and hidden. They're not physically removed until you "compact" the folder. Folders can get corrupted when many messages are deleted and you don't compact often enough. Its recommended that you keep the number of messages in your inbox small, and move any you want to keep to other folders.