def METHOD_NAME(self, collection_name):
    # Get the number of milvus collection
    try:
        self.set_collection(collection_name)
        self.collection.flush()
        num = self.collection.num_entities
        LOGGER.debug(f"Successfully get the num:{num} of the collection:{collection_name}")
        return num
    except Exception as e:
        LOGGER.error(f"Failed to count vectors in Milvus: {e}")
        sys.exit(1)