bitcoind synced more blocks than in the blockchain?
You requested the amount of blocks in the testnet. In the 'real' blockchain, there are currently 309913 blocks, which is in agreement with your blockcount. 

Change 

$ curl http://blockexplorer.com/testnet/q/getblockcount


into

$ curl http://blockexplorer.com/q/getblockcount


So no need of removal of anything. Everything is perfectly fine.