Once you made your query on the collection you get an object (a Document we call this), then you have to loop over your friends Array to count what you want.
By the way, as @msavin told you, your query only returns 1 Document due to the filter on the field _id, so you could use the method .findOne() (which directly returns an Object), instead of .find() (which returns a Cursor) followed by .fetch() to get an Array of the results.
I think you want to count the elements in the friends-array and not the documents. But with Friends…count() you can only count the documents of the collection Friends. Instead you need to get the document where there is at least one friends-item with status 1 and then filter the array (not the collection) and return its length.
[Vue warn]: Property or method “countwaitingapproval” is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.
Which which check that the next part of the nested object exists before trying to access a property on it, and falling back to 0 if there are no friends.
Which is what I meant by "handle that case appropriately"
Of course, if you modelled your data properly this wouldn’t be so painful
I was just going to suggest my socialize packages as @coagmano did… I think you would find them to be very useful if you are building social features into an app, and especially if you are doing so in more than 1.
Also if you want an example of the packages in use you can check out the demo I am building at https://github.com/copleykj/meteor-socialize-demo. It is still a work in progress, but it demonstrates how to use the packages as well as their plug and play redis-oplog integration.