Mq: Fix COUNT (not) smart logic
Try mysql class improving (native exceptions and data types).