Possible Duplicate:
Querying internal array size in MongoDB
I have a document which contains an array category. I just want to know how many items there are in category. All I could find in the documentation is how to count the number of top level documents.
{
 "_id": {
     "$oid": "4e73a30466ca1a1f56000001"
    },
 "category": [
     "Food",
     "Entertainment"
    ]
}