implement count for PDO MySQL
implement count_total for PDO MySQL