Get the number of photos per page.
This value is returned by flickr as "per_page" and "perpage", depending on the method that was called.
This class can parse either value, and will return whichever one was found.

@return number of photos per page.
541758
public Integer getPerPage() {
		int ret = 0;
		if (photos != null) {
			int pp;
			if (photos.perpage == null) {
				pp = 0;
			} else {
				pp = photos.perpage;
			}

			int pP;
			if (photos.perPage == null ) {
				pP = 0;
			} else {
				pP = photos.perPage;
			}

			if (pp > pP) {
				ret = pp;
			} else {
				ret = pP;
			}
		}
		return ret;
	}
502248
public function objectsPerPage()
    {
        $perPage = 10;
        if (!empty($this->headers[self::PER_PAGE]) && is_array($this->headers[self::PER_PAGE])) {
            $perPage = (int) $this->headers[self::PER_PAGE][0];
        }

        return $perPage;
    }
414084
def _get_nb_pages(self):
        
        try:
            filelist = self.fs.listdir(self.path)
            count = 0
            for filepath in filelist:
                filename = self.fs.basename(filepath)
                if (filename[-4:].lower() != "." + ImgPage.EXT_IMG or
                    (filename[-10:].lower() == "." + ImgPage.EXT_THUMB) or
                    (filename[:len(ImgPage.FILE_PREFIX)].lower() !=
                        ImgPage.FILE_PREFIX)):
                    continue
                count += 1
            return count
        except IOError as exc:
            logger.debug("Exception while trying to get the number of"
                         " pages of '%s': %s", self.docid, exc)
            return 0
        except OSError as exc:
            if exc.errno != errno.ENOENT:
                logger.error("Exception while trying to get the number of"
                             " pages of '%s': %s", self.docid, exc)
                raise
            return 0
1007814
function activity_userComments ($per_page = NULL, $page = NULL)
    {
        /** http://www.flickr.com/services/api/flickr.activity.userComments.html */
        $this->request('flickr.activity.userComments', array("per_page" => $per_page, "page" => $page));
        return $this->parsed_response ? $this->parsed_response['items']['item'] : false;
    }
1273312
public function getPaginatedGalleryImages() {

        $getGalleryImages = $this->GalleryImages()->sort('SortOrder DESC');
        $getRequest = $this->getRequest();

        $paginatedGalleryImages = PaginatedList::create(
            $getGalleryImages,
            $getRequest
        )->setPageLength(12);

        return $paginatedGalleryImages;

    }
1372264
def get_info(photo_id, api_key):
    '''  '''
    query = urlencode({
        'method': 'flickr.photos.getInfo',
        'api_key': api_key,
        'photo_id': photo_id,
        'format': 'json',
        'nojsoncallback': '1'
    })

    r = urlopen('https://api.flickr.com/services/rest/?' + query)
    info = json.loads(r.read().decode('utf-8'))

    if info['stat'] == 'fail':
        raise ValueError(info['message'])

    return info
455532
public function get_page() {

        // unless page was not specifically set through the "set_page" method
        if (!$this->_properties['page_set']) {

            // if
            if (

                // page propagation is SEO friendly
                $this->_properties['method'] == 'url' &&

                // the current page is set in the URL
                preg_match('/\b' . preg_quote($this->_properties['variable_name']) . '([0-9]+)\b/i', $_SERVER['REQUEST_URI'], $matches) > 0

            )

                // set the current page to whatever it is indicated in the URL
                $this->set_page((int)$matches[1]);

            // if page propagation is done through GET and the current page is set in $_GET
            elseif (isset($_GET[$this->_properties['variable_name']]))

                // set the current page to whatever it was set to
                $this->set_page((int)$_GET[$this->_properties['variable_name']]);

        }

        // if showing records in reverse order we must know the total number of records and the number of records per page
        // *before* calling the "get_page" method
        if ($this->_properties['reverse'] && $this->_properties['records'] == '') trigger_error('When showing records in reverse order you must specify the total number of records (by calling the "records" method) *before* the first use of the "get_page" method!', E_USER_ERROR);

        if ($this->_properties['reverse'] && $this->_properties['records_per_page'] == '') trigger_error('When showing records in reverse order you must specify the number of records per page (by calling the "records_per_page" method) *before* the first use of the "get_page" method!', E_USER_ERROR);

        // get the total number of pages
        $this->_properties['total_pages'] = $this->get_pages();

        // if there are any pages
        if ($this->_properties['total_pages'] > 0) {

            // if current page is beyond the total number pages
            /// make the current page be the last page
            if ($this->_properties['page'] > $this->_properties['total_pages']) $this->_properties['page'] = $this->_properties['total_pages'];

            // if current page is smaller than 1
            // make the current page 1
            elseif ($this->_properties['page'] < 1) $this->_properties['page'] = 1;

        }

        // if we're just starting and we have to display links in reverse order
        // set the first to the last one rather then first
        if (!$this->_properties['page_set'] && $this->_properties['reverse']) $this->set_page($this->_properties['total_pages']);

        // return the current page
        return $this->_properties['page'];

    }
120112
def get_thumbnail_image(self, page=1):
        
        url = self.get_thumbnail_image_url(page=page)
        return self._get_url(url)
360165
def get_client_properties_per_page(self, per_page=1000, page=1, params=None):
        
        return self._get_resource_per_page(
            resource=CLIENT_PROPERTIES,
            per_page=per_page,
            page=page,
            params=params
        )
1012528
public int getPageNumber() {
    if (DataTable_Type.featOkTst && ((DataTable_Type)jcasType).casFeat_pageNumber == null)
      jcasType.jcas.throwFeatMissing("pageNumber", "ch.epfl.bbp.uima.types.DataTable");
    return jcasType.ll_cas.ll_getIntValue(addr, ((DataTable_Type)jcasType).casFeatCode_pageNumber);}
336284
public function numberOfPages(){
        if($this->totalAmount == 0){
            return 0;
        }
        $cantidad= $this->totalAmount / $this->amountPerPage;
        if(is_int($cantidad)){
            return $cantidad;
        }else{
            $cantidad_int= intval($cantidad);
            if($cantidad_int > $cantidad){
                return $cantidad_int;
            }else{
                return $cantidad_int + 1;
            }
        }
    }
360874
public Collection<Blog> getList() throws FlickrException {
        List<Blog> blogs = new ArrayList<Blog>();

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_GET_LIST);

        Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }

        Element blogsElement = response.getPayload();
        NodeList blogNodes = blogsElement.getElementsByTagName("blog");
        for (int i = 0; i < blogNodes.getLength(); i++) {
            Element blogElement = (Element) blogNodes.item(i);
            Blog blog = new Blog();
            blog.setId(blogElement.getAttribute("id"));
            blog.setName(blogElement.getAttribute("name"));
            blog.setNeedPassword("1".equals(blogElement.getAttribute("needspassword")));
            blog.setUrl(blogElement.getAttribute("url"));
            blogs.add(blog);
        }
        return blogs;
    }
283945
def num_pages(self):
        

        if self.count == 0 and not self.allow_empty_first_page:
            return 0

        hits = max(1, self.count - self.orphans)

        return int(ceil(hits / float(self.per_page)))
98655
function getPageCount() {
		if (!$this->limit) {
			return 1;
		}
		$rem = ($this->getTotal() % $this->limit);
		$rem = ($rem >= 0) ? $rem : 0;
		$total_pages = ($this->getTotal() - $rem) / $this->limit;
		if ($rem)
			$total_pages++;
		return $total_pages;
	}
661868
public Collection<Group> getGroups() throws FlickrException {
        GroupList<Group> groups = new GroupList<Group>();

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_GET_GROUPS);

        Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        Element groupsElement = response.getPayload();
        groups.setPage(groupsElement.getAttribute("page"));
        groups.setPages(groupsElement.getAttribute("pages"));
        groups.setPerPage(groupsElement.getAttribute("perpage"));
        groups.setTotal(groupsElement.getAttribute("total"));
        NodeList groupNodes = groupsElement.getElementsByTagName("group");
        for (int i = 0; i < groupNodes.getLength(); i++) {
            Element groupElement = (Element) groupNodes.item(i);
            Group group = new Group();
            group.setId(groupElement.getAttribute("id"));
            group.setName(groupElement.getAttribute("name"));
            group.setAdmin("1".equals(groupElement.getAttribute("admin")));
            group.setPrivacy(groupElement.getAttribute("privacy"));
            group.setIconServer(groupElement.getAttribute("iconserver"));
            group.setIconFarm(groupElement.getAttribute("iconfarm"));
            group.setPhotoCount(groupElement.getAttribute("photos"));
            groups.add(group);
        }
        return groups;
    }
184161
protected function countPage()
	{
		$pageNumber = 0;
		$items = $this->fullyItems - $this->itemPerPage;
		
		while ($items > 0) {
			++$pageNumber;
			$items -= $this->itemPerPage;
		}
		++$pageNumber;
		
		return $pageNumber;
	}
632378
public function getTotalPages()
    {
        if ($this->totalItems > 0 && $this->itemsPerPage > 0) {
            if (($this->totalItems%$this->itemsPerPage) != 0) {
                return (int)($this->totalItems/$this->itemsPerPage) + 1;
            }
            else {
                return (int)($this->totalItems/$this->itemsPerPage);
            }
        }

        return 0;
    }