Parameters
    • [callback] «Function» optional params are (error, count)

    Returns:

    There are also minor differences in how countDocuments() handles . versus count().

    This function triggers the following middleware.

    Example: