Update library/Zend/Paginator/Adapter/DbSelect.php

Use GROUP BY as the count column with distinct.
Another problems are still: Union, Multiple Group By, ...

See from ZF1: http://framework.zend.com/code/filedetails.php?repname=zf.Zend+Framework&path=%2Ftrunk%2Flibrary%2FZend%2FPaginator%2FAdapter%2FDbSelect.php