The entitySelection.count( ) method returns the number of entities in the entity selection with a non-null value in attributePath.
Note: Only scalar values are taken into account. Object or collection type values are considered as null values.
An error is returned if:
We want to find out the total number of employees for a company without counting any whose job title has not been specified:
C_OBJECT($sel)
C_REAL($count)
$sel:=ds.Employee.query("employer = :1";"Acme, Inc")
$count:=$sel.count("jobtitle")