not sure I understand, assuming you want to get value of the field "Pages" of you current document:
Try to print it first:
<%=CMS.DocumentEngine.DocumentContext.CurrentDocument.GetValue("Pages")%>
or
<%# IfEmpty(CMS.DocumentEngine.DocumentContext.CurrentDocument.GetValue("Pages"), "Pages empty", "Pages has somehting") %>