Using count function

Using count function

I've created the following script which works well - however, I want to pass the count value to a variable -- I can't see any help on this with the count function:

if (count(Workflow_Tasks[Job == input.Temp_Jobs_List])  ==  0)
{
    alert("There are no active Tasks for this Job");
}

Thanks,
Martyn