Page numbers require an
NCX pagelist whose syntax is explained in the wiki topic that I linked to..
Also each page number needs to be defined in the body text via an anchor whose ID must start with a letter. E.g.
<a id="page1"></a>. (You can't just use the number.)
Some time ago I created a simple
ePub pagelist test file that demonstrates all of this. (You can ignore the additional files in the archive; they're only relevant for Kindles.)