popcorn :: Repository :: count
query
# Count instances that matches `query` fun count(query: nullable QUERY): Int is abstract
redef fun count(query) do return collection.count(query or else new JsonObject) end