Get # of sheets for a document in SQL?

Is there a way inside SQL (query, stored procedure, etc.) to get the total # of sheets for a particular document?  Something that returns the same thing as "\$PRP:SW-Total Sheets,"

SolidworksSolidworks Pdm enterprise Pdm