I might have an idea here. Could you let us know what variable is being used to display the page count? A screenshot of the Actions in Lectora would be perfect. Wherever this is coming from there may be something wrong there.
For example I have seen this when the variable PageInChapter is used, but the page you are on is not within a chapter. This returns a NULL value.