Answers.Body: <p>You can get the total amount of rows like this: </p>
  
  <pre><code>{% set totalcount = 0 %}
  {% for entry in entries %}
      {% set totalcount = totalcount + entry.artikelnummer|length %} 
  {% endfor %}
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>In the loop you add the length to the totalCount.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-27T22:06:51.370Z
Answers.Text: Thanks a lot! Had to add a `{% set totalcount = 0 %}` outside the loop and it worked!
Answers.UserDisplayName: TomS
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-27T23:25:07.810Z
Answers.Text: @TomS I'll edit the answer so it's more clear for everyone ;)
Answers.UserDisplayName: Jan_dh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-27T16:09:30.953Z
Answers.LastActivityDate: 2017-01-27T23:25:35.713Z
Answers.LastEditDate: 2017-01-27T23:25:35.713Z
Answers.UserDisplayName: Jan_dh
Body: <p>I would like to know, how many values are saved in the table field called "artikelnummer" with the field name "artikel". The section is called "bikes". I tried:</p>
  
  <pre><code>{% set entries = craft.entries.section('bikes') %}
  
  {% for entry in entries %}
    {% for row in entry.artikelnummer %}
      {{ row.artikel|length }}
    {% endfor %}
  {% endfor %}
  </code></pre>
  
  <p>Thanks!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-27T16:40:31.093Z
Comments.Text: `{{ row.length }}` gives me Key "length" for array with keys "col1, artikel" does not exist error. {{entry.artikelnummer|length}} gives me: 2 1 1 1 1 0 0 0 0 0 1 1 0 1 1 1 1 1 1 0 1 2 1 0 1 1 2. I need the sum of them.
Comments.UserDisplayName: TomS
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-27T18:40:39.547Z
Comments.Text: sorry, misread your question. updated the answer
Comments.UserDisplayName: Jan_dh
Tags: <sections><table-field><count>
Title: Count table field values in certain section
ThreadText: # Count table field values in certain section
  
  (Asked by: username_0 on 2017-01-27)
  
  I would like to know, how many values are saved in the table field called "artikelnummer" with the field name "artikel". The section is called "bikes". I tried:
  
  ```
  {% set entries = craft.entries.section('bikes') %}
  
  {% for entry in entries %}
    {% for row in entry.artikelnummer %}
      {{ row.artikel|length }}
    {% endfor %}
  {% endfor %}
  
  ```
  
  Thanks!
  
  **Tags:** sections, table-field, count
  
  > **Comments:**
  > **username_0**: `{{ row.length }}` gives me Key "length" for array with keys "col1, artikel" does not exist error. {{entry.artikelnummer|length}} gives me: 2 1 1 1 1 0 0 0 0 0 1 1 0 1 1 1 1 1 1 0 1 2 1 0 1 1 2. I need the sum of them.  
  > **username_1**: sorry, misread your question. updated the answer  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-27. Score: 2 | Accepted answer
  
  You can get the total amount of rows like this:
  
  ```
  {% set totalcount = 0 %}
  {% for entry in entries %}
      {% set totalcount = totalcount + entry.artikelnummer|length %} 
  {% endfor %}
  
  ```
  
  **Edit**
  
  In the loop you add the length to the totalCount.
  
  > **Comments:**
  > **username_0**: Thanks a lot! Had to add a `{% set totalcount = 0 %}` outside the loop and it worked!  
  > **username_1**: @username_0 I'll edit the answer so it's more clear for everyone ;)  
  
  ---
  
  