count

Learn how to use the count function in Notion formulas.

The count() function accepts a list argument and returns the number of elements in that list. You can also provide a condition as a second argument; if you do, count() will return the number of elements in the list for which the condition is true.

count(list)
list.count()

count(list, condition)
list.count(condition)
Code language: JavaScript (javascript)

Much like map, filter, and other list functions, count iterates through the entire list and uses the current keyword to represent the current element it is evaluating against the provided condition.

Assume a multi-select property called “Multi-select”, where 8 entries are present on the current page:

prop("Multi-select").count() /* Output: 8 */

// Also works as:
count(prop("Multi-select"))
Code language: JavaScript (javascript)

Assume 3 entries on that page contain the letter “a”:

prop("Multi-select").count(current.contains("a"))

// Also works as:
count(prop("Multi-select"), current.contains("a"))
Code language: JavaScript (javascript)
About the Author

My name is Thomas Frank, and I'm a Notion-certified writer, YouTuber, and template creator. I've been using Notion since 2018 to organize my personal life and to run my business and YouTube channel. In addition to this formula reference, I've created a free Notion course for beginners and several productivity-focused Notion templates. If you'd like to connect, follow me on Twitter.

🤔 Have an UB Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas

🤔 Have a Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas