Count

shortcuts-action-icon-count.webp

Counts the number of items, characters, words, sentences, or lines passed as input. Note (from Apple, for real) This is just like the Count in Sesame Street, but instead of a vampire, it's a Shortcuts action.

Score
Type
InterActivity
Expertise
4
4/5
Type
InterActivity
Expertise

Action Information

Parameters

Count [Items, Characters, Words, Sentences, Lines] in [Input]

Input

Anything, Text

Result

Number

Details

Type
Interactivity
Expertise Needed
Matthew's Score
4/5
Category
Date Added
11/12/2014
Identifier
is.workflow.actions.count

Comments

I previously would use this all of the time alongside “If” to check whether or not there was anything coming from the Share sheet (1); if not (0), then I’d use Get Clipboard.

This technique makes shortcuts work from both the Share sheet or from the widget/Siri using something you grabbed with copy & paste; however, in iOS 13, the “If” action was updated to include “If [Input] does/does not have any input]”, making this technique unnecessary. It was confusing to explain, so I am glad to reduce the number of actions I use and not include Count all over the place.

However, I still do use it to check whether there’s 1 or more, so it’s not totally out of use.

I also take advantage of Count for Words for estimating how long articles will take to read, Characters for making sure my tweets don’t go over Twitter’s limit, and in other scripting situations.

Works Well With

No results found.

Shortcuts Using This

shortcut-send-thank-yous-icon.png
Send thank-yous
Asks you to pick from your contacts, then shows a Messages window for each so you can send a thank-you message.
shortcut-check-for-a-white-christmas-icon.png
Check for a white christmas
Looks for snow in the daily forecast for the next 10 days.


Get more out of Shortcuts – become a member.