No trivial method exists natively. You could look at exporting your collection data, then calculate a count and store it. Using AJAX you could remotely retrieve the count and display it.
FYI: When Webflow releases a feature they add it to updates and announcements, which is visible from your dashboard. They also normally add a topic to Official Announcements in the forums. So that is where you should check.
Hey all, I’m in need of this as well. I’m thinking of building a proper solution for this.
Tabulation through the Webflow API
Caching of tabulated numbers
Possible ability to query/filter in some limited ways
Exposing tabulated data as JSON
Simple widget templates to pull and display that JSON data in your site
It’s not a small project though, and might only make sense if others are interested in using it too as a paid (but cheap) SaaS solution, to help cover hosting. Anyone else keen?
Still not added yet. How hard would it be to add, the CMSes are already lists, couldn’t this be implemented in a week? Where you bind it to a field but only get the count (the number of objects in that collection), and done. Come on guys.
Just a quick comment to say “thank you” for this utils library, Mike. I’ve just managed to build a feature that selects a random Webflow Item to display based on “N” number of Items in the Collection. Your Collection Item Count function feeds in the dynamic value of Items to the random Item picker without which, it would be impossible to create a random number.
Sounds fantastic. Just a note in case it’s useful- depending on what you’re doing and where on your site you’re needing it, there is sort of a way to do that using a Collection List element.
Drop in a collection list element, and bind it to your collection
Filter it as desired, to the types of items you want
Limit the number of items displayed to 1
Set the sort order to “random.”
On each page refresh, you’ll get a random 1 item in the list. It’s handy for things like showing a random customer testimonial ( but only 1 or 2 ).