Till the implementation of your "count" keyword, you should do your query in a store procedure on the server.
Take care to not get all columns/properties in your query if you want only a count.
Select only the ID, as shown below:
dc.CreateDocumentQuery(update.SelfLink, "SELECT c.id FROM c")