public int getLabelsCount() {
    this.lock.readLock().lock();
    try {
      return this.labels.size();
    } finally {
      this.lock.readLock().unlock();
    }
  }
Returns The total number of visibility labels.
hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityLabelsCache.java