Count refers to the number of objects in a collection. It's also a commonly-used SQL function that counts the number of rows.
Many programming languages offer some sort of count
, length
or size
fields and/or methods for arrays and collections, e.g. PHP's count($array)
or Java's array.length
.
COUNT()
is also commonly-used SQL function that counts the number of rows in a table. It is an ANSI SQL aggregate function that returns the number of times the argument is encountered per group (or if no non-aggregate columns, per query). Commonly, the argument is specified as *
- ie COUNT(*)
- simply counting the rows. It can be used to count distinct values of a column like this: COUNT(DISTINCT MY_COLUMN)
Reference
See also: