Fixed an issue of low performance of get count() in mysql.