Retrieve the count query for this pager.
The count query may be specified manually or, by default, taken from the query we are extending.
SelectQueryInterface A count query object.
public function getCountQuery() {
if ($this->customCountQuery) {
return $this->customCountQuery;
}
else {
return $this->query
->countQuery();
}
}