def count(opts = {})
      view = opts[:view] || @opts[:view]
      # The count that we want is the total documents in the database minus
      # CouchDB design documents.  Asking for the design documents will give us
      # the total count in addition to letting us determine the number of
      # design documents.
      v = client.view(view,
                      include_docs: false,
                      stream: false,
                      startkey: '_design',
                      endkey: '_design0')
      total = v.total_rows
      design_doc_count = v.keys.size
      total - design_doc_count
    end
def count(opts = {})
      view = opts[:view] || @opts[:view]
      # The count that we want is the total documents in the database minus
      # CouchDB design documents.  Asking for the design documents will give us
      # the total count in addition to letting us determine the number of
      # design documents.
      v = client.view(view,
                      include_docs: false,
                      stream: false,
                      startkey: '_design',
                      endkey: '_design0')
      total = v.total_rows
      design_doc_count = v.keys.size
      total - design_doc_count
    end
Return the total number of documents reported by a CouchDB view.

 @param opts [Hash]  Analysand::Database#view options
                     - view:  database view name
 @return [Fixnum]