def METHOD_NAME(db, pid, query, options, output=None):
    search = db.searchExact(query, options)
    cnt = 0
    while search.next():
        cnt = cnt + 1
    outPrint("PID {0}) Total count {1}".format(pid, cnt), pid, output)