int lastPageNo()
The method lastPageNo() returns the last page number in a paged record set.
lastPageNo()
$p = $db->lastPageNo();