Backed out changes from pr47 as COUNT(*) kills performance on large INNODB tables