count
relationalai.semantics.std.aggregates
count(*args: AggValue) -> AggregateCount the number of values.
Parameters
Section titled “Parameters”
(*argsAggValue, default:()) - Values to count. Can include Distinct wrapper for distinct count.
Returns
Section titled “Returns”Aggregate- AnAggregaterepresenting the computation of the count. ReturnsInteger.
Examples
Section titled “Examples”Count all employees:
select(aggregates.count(Employee))Count employees per department:
select(Department, aggregates.count(Employee).per(Department))Referenced By
Section titled “Referenced By”RelationalAI Documentation ├── Build With RelationalAI │ └── Understand how PyRel works │ ├── Build a semantic model │ │ └── Query a model │ │ └── Aggregate results withcountandper│ └── Use advanced reasoning > Rules-based reasoning │ └── Aggregate and group data │ └── Count matches with.count()└── Release Notes └── Python API Release Notes ├── What’s New in Version 1.17.0 │ └── Bug Fixes and Diagnostics └── What’s New in Version 1.26.0 └── Bug Fixes