<commit_before><div id="memberships-index">

<h1><%= _('Manage my groups') %></h1>

<% button_bar do %>
  <%= button(:add, __('Create a new community'), :controller => 'memberships', :action => 'new_community') %>
  <%= button :add, __('Register a new enterprise'), :controller => 'enterprise_registration' if environment.enabled?('enterprise_registration') %>
  <%= button :back, _('Go back'), :controller => 'profile_editor' %>
<% end %>

<ul>
<% for membership in @memberships %>
  <li>
    <div class='common-profile-list-block'>
      <%= profile_image_link(membership, :portrait, 'div') %>
    </div>
    <span class='profile-details'>
      <strong><%= membership.name %></strong><br/>
      <%= _('Role: %s') % rolename_for(profile, membership) %> <br/>
      <%= _('Type: %s') % getterm(membership.class.identification) %> <br/>
      <%= _('Description: %s') % membership.description  + '<br/>' if membership.community? %>
      <%= _('Members: %s') % membership.members.size.to_s %> <br/>
      <%= _('Created at: %s') % show_date(membership.created_at) unless membership.enterprise? %> <br/>
      <% button_bar do %>
        <%= button 'menu-ctrl-panel', _('Control panel of this group'), membership.admin_url %>
        <%= button 'menu-logout', _('Leave'), membership.leave_url(true), :class => 'leave-community' %>
        <% if (membership.community? && user.has_permission?(:destroy_profile, membership)) %>
          <%= button 'delete', _('Remove'), { :controller => 'profile_editor', :action => 'destroy_profile', :profile => membership.identifier } %>
        <% end %>
      <% end %>
    </span>
    <br class="may-clear" />
  </li>
<% end %>
</ul>

</div><commit_msg>Use the correct way of counting members<commit_after><div id="memberships-index">

<h1><%= _('Manage my groups') %></h1>

<% button_bar do %>
  <%= button(:add, __('Create a new community'), :controller => 'memberships', :action => 'new_community') %>
  <%= button :add, __('Register a new enterprise'), :controller => 'enterprise_registration' if environment.enabled?('enterprise_registration') %>
  <%= button :back, _('Go back'), :controller => 'profile_editor' %>
<% end %>

<ul>
<% for membership in @memberships %>
  <li>
    <div class='common-profile-list-block'>
      <%= profile_image_link(membership, :portrait, 'div') %>
    </div>
    <span class='profile-details'>
      <strong><%= membership.name %></strong><br/>
      <%= _('Role: %s') % rolename_for(profile, membership) %> <br/>
      <%= _('Type: %s') % getterm(membership.class.identification) %> <br/>
      <%= _('Description: %s') % membership.description  + '<br/>' if membership.community? %>
      <%= _('Members: %s') % membership.members_count.to_s %> <br/>
      <%= _('Created at: %s') % show_date(membership.created_at) unless membership.enterprise? %> <br/>
      <% button_bar do %>
        <%= button 'menu-ctrl-panel', _('Control panel of this group'), membership.admin_url %>
        <%= button 'menu-logout', _('Leave'), membership.leave_url(true), :class => 'leave-community' %>
        <% if (membership.community? && user.has_permission?(:destroy_profile, membership)) %>
          <%= button 'delete', _('Remove'), { :controller => 'profile_editor', :action => 'destroy_profile', :profile => membership.identifier } %>
        <% end %>
      <% end %>
    </span>
    <br class="may-clear" />
  </li>
<% end %>
</ul>

</div>
{'fraction_non_alphanumeric': 0.2143066549399003, 'fraction_numerical': 0.0011726766344180592, 'mean_word_length': 3.9164265129683, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 105, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2210286', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1067, 'n_words': 237}