Facebook does not actively count the number of posts made by the page; depending on the page, this may be an astronomical number.
You will need to receive all messages and calculate them yourself. I would use something like this.
{PAGE}/posts?fields=id&limit=250
It will return the smallest possible data set that you need. You cannot go above 250, you can with FQL, but not with v2.1. Also, you do not want FEED, because it is an aggregation of pages and messages made on the page by other users. This will return such an object.
{ "data" : [ PostData ... ], "paging" : { ... "next" : CursorURL } }
This is the cursor URL, so you can disable groups of 250 messages in reverse chronological order.
You can reduce the score by increasing 250 each time you get a new cursor that also returns more messages. You will only need to count and add the results to the set using the second to the last cursor, since the last cursor will return an empty data array.
source share