Every successful execution of action, condition / branching, modify data (inline in an action or independent step), search (inline in an action or independent step) is counted as a task.
Triggers are free. Failed actions are also NOT counted.
Let’s take an example: You get a lead from Facebook. You check if it has an email. If yes, you add it to Mailchimp. But in Add contact action, you extract & assign the first name, last name from the full name. For this, you use Modify Data in 2 fields - first name & last name.
So successful execution of this will consume 4 tasks :
Facebook trigger - 0 (free)
Condition true - 1
Mailchimp Action - 1
Inline Modify Data - 2