Option 1: You could connect via any Dgraph client to slash as mentioned here and fire a count query. As mentioned, " The form count(uid) counts the number of UIDs matched in the enclosing block.". This will help you count the posts.
Option 2: Fire a custom DQL as mentioned here.
IMO, option 1 might be better here.