@Switch Blayde
For an ebook, you don't.
How Amazon determines it is a mystery. They must have some formula based on number of words, white space, etc. That's a guess, btw.
Hmmm,
I opened an ebook on my reader (Sony PRS-T1) and it displays 328 pages. The page numbering does not correspond to the page size shown by the reader, font size doesn't affect it.
The book is the ebook version of a dead tree book: "Under A Graveyard Sky" by John Ringo, Baen Books.
"Acknowledgements" start with 'page 9 of 328', the next ebook page shows 'page 9-10 of 328', followed by 'page 10 of 328'.
You see how it works?
The very same book opened with Calibre's Ebook Reader program shows '1.0 / 697'.
For use on my reader I created ebook versions of some stories I downloded from SOL and ASSTR using Calibre.
For the html files from SOL I used Calibres ebook editor with the 'xht.css' from SOL, but replaced the start of each chapter with with a short 6 line starting sequence of my own (head and body up to the chapter headline). At the end of the chapter I deleted all lines after the last text line exept the closing statements for body and html. I didn't set any page size explicitely.
Paging through one of these books it displays 'page 1 of 186', 'page 2 of 186', then Chapter 1 starts with 'page 3 of 186', 'page 3 of 186', 'page 3-4 of 186', 'page 4 of 186', page 4 of 186', 'page 4-5 of 186', 'page 5 of 186', 'page 5 of 186', 'page 5-6 of 186', 'page 6 of 186', 'page 6-7 of 186', ... Chapter 1 ends on 'page 12 of 186'.
The stories from ASSTR I stored as simple text files, deleted the line breaks within paragraphs and converted the files to EPUBs with Calibre using Calibre's default settings.
When I open one of these ebooks on the reader, it shows 'page 1 of 76'. Chapter 1 starts with 'page 3 of 76', 'page 3-4 of 76', 'page 4 of 76', 'page 4-5 of 76', ...
When I open the same ebook with Calibre's Ebook Reader program it displays '1.0 / 174'.
So to me it looks like each reading software uses its own formula to compute the page count!
HM.