https://www.postgresql.org/docs/current/functions-aggregate.html#FUNCTIONS-AGGREGATE-TABLE
The manual says: count ( "any" ) → bigint > > Computes the number of input rows in which the input value is not null. > But ROW values or composite types that "are null" are counted, anyway. See: *db<>fiddle [here]( https://dbfiddle.uk/?rdbms=postgres_14&fiddle=7364f3f582322ac687b39c677826a074)* Feels like a bug, but I cannot imagine how this would have slipped everybody's attention for so long. It should at least be documented. Maybe: Computes the number of input rows in which the input value is not a plain NULL value. (Composite or ROW values count in any case - even if value IS NULL evaluates to true.) Regards Erwin