/**
  * Returns the total number of groups in the system.
  *
  * @return the total number of groups.
  */
 public int getGroupCount() {
   Integer count = (Integer) groupMetaCache.get(GROUP_COUNT_KEY);
   if (count == null) {
     synchronized (GROUP_COUNT_KEY.intern()) {
       count = (Integer) groupMetaCache.get(GROUP_COUNT_KEY);
       if (count == null) {
         count = provider.getGroupCount();
         groupMetaCache.put(GROUP_COUNT_KEY, count);
       }
     }
   }
   return count;
 }