Fix incorrect listing of records from to count

This pull request fixes bug 3683 (https://sourceforge.net/p/phpmyadmin/bugs/3683/)