You can count the number of documents associated with a particular library (and optionally class) as follows.
libraryId is a path parameter. It is the only mandatory parameter. However, using the classId helps narrow the response to documents of a specific class you want.
classId).