When performing a select count(*), maxlength is not defined, size is.  This changes the output for debug() and displays size and elimiates the error message :  Undefined property: stdClass::
Merge pull request #54 from jwheat/select_count_fix

fix for Undefined property: stdClass::$max_length