Page number extraction at the time of Data scraping

how can i get the page number for which i perform Data Scraping.
e.g-i want to search a product in Amazon.After search i want to perform data scraping to extract the data and i also want to know from which page number i extracted the data?how can i do this page number extraction.