@Override
    public int getGroupCount()
    {
        return getGroupProviders().parallelStream()
            .map(GroupProvider::getGroupCount)
            .reduce(0, Integer::sum);
    }
Returns the number of groups in the system, calculated as the sum of groups in each provider.

@return the number of groups in the system.
xmppserver/src/main/java/org/jivesoftware/openfire/group/GroupMultiProvider.java