{{#get "posts" limit="1" as |posts pagination|}}
{{pagination.total}} total posts
{{/get}}
{{#get "posts" limit="1" filter="visibility:public" as |posts pagination|}}
{{pagination.total}} public posts
{{/get}}
{{#get "posts" limit="1" filter="visibility:-paid" as |posts pagination|}}
{{pagination.total}} free posts
{{/get}}
{{#get "posts" limit="1" filter="visibility:members" as |posts pagination|}}
{{pagination.total}} members posts
{{/get}}
{{#get "posts" limit="1" filter="visibility:paid" as |posts pagination|}}
{{pagination.total}} paid-members-only posts
{{/get}}
Using limit="1"
means you’re not fetching and parsing tons of data from the database and API into memory but you’ll still have access to the pagination
object returned from the browse endpoint which can give you the counts.