<commit_before><% id = element.nickname %>
<% unless id.blank? %>
  <% count = @chapter.notes.where(:element_id => id).count %>
  <span class='note_button' id='note_button_<%= id %>'><%= link_to "#{pluralize(count, "note")} +", new_book_chapter_element_note_path(@book, @chapter, id), :remote => true, :update => id %></span>
<% end %>
<commit_msg>Count notes using association method<commit_after><% id = element.nickname %>
<% unless id.blank? %>
  <% count = element.notes.count %>
  <span class='note_button' id='note_button_<%= id %>'><%= link_to "#{pluralize(count, "note")} +", new_book_chapter_element_note_path(@book, @chapter, id), :remote => true, :update => id %></span>
<% end %>

{'fraction_non_alphanumeric': 0.22077922077922077, 'fraction_numerical': 0.0, 'mean_word_length': 6.081632653061225, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 24, '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': '103800', 'n_tokens_mistral': 261, 'n_tokens_neox': 237, 'n_words': 51}