[DOCS-6636] Comment on: "manual/reference/method/db.collection.count.txt" Created: 23/Nov/15 Updated: 03/Nov/17 Resolved: 23/Nov/15 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 01112017-cleanup |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Docs Collector User (Inactive) | Assignee: | Kay Kim (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | collector-298ba4e7 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Location: https://docs.mongodb.org/manual/reference/method/db.collection.count/ |
||
| Participants: | |
| Days since reply: | 8 years, 12 weeks, 3 days ago |
| Description |
|
what i want from this document is how to count array not count object. Thanks. |
| Comments |
| Comment by Kay Kim (Inactive) [ 23/Nov/15 ] |
|
We have the $size operator in the aggregation framework to count elements in an array. https://docs.mongodb.org/master/reference/operator/aggregation/size/ The db.collection.count() page counts the number of documents in the array, as the page states. |