slove the error in getPageCounts, this error is caused by the type of NValue