I was dumping and importing MySQL databases between my production server which had MySQL 5.0.95 and my test server which had MySQL 5.1.61 and was getting the error “Column count of mysql.proc is wrong. Expected 20, found 16. The table is probably corrupted;” on the test server with the copied over database.
To make a long story short apparently there is some bug in MySQL that causes this rather cryptic error when moving a database created by 5.0 to 5.1. To fix this problem you need to run the following command as root (or use sudo) on the server you have migrated the database.
mysql_upgrade --force -uroot -p [your mysql root password]
You have to use the –force option or else the upgrade won’t fix the problem. I hope this saves someone a little time.