{% assign activities_count = 0 %}
{% assign quizzes_count = 0 %}

{% for course_section in course.sections %}
  {% for course_activity in course_section.activities %}
    {% assign activities_count = activities_count | plus: 1 %}

    {% if course_activity.type == "quiz" %}
      {% assign quizzes_count = quizzes_count | plus: 1 %}
    {% endif %}
  {% endfor %}
{% endfor %} 

<div class="np-course-details">
    <div class="np-course-detail">                 
        <strong>{{ activities_count }}</strong>
        <span class="np-details-label">
          {% if activities_count == 1 %}Activity{% else %}Activities{% endif %}
        </span>
    </div>
    <div class="np-course-detail">
        <strong>{{ quizzes_count }}</strong>
        <span class="np-details-label">
          {% if quizzes_count == 1 %}Quiz{% else %}Quizzes{% endif %}
        </span>
    </div>
    <div class="np-course-detail">
        {% if course.properties.course_length > 0 %}
            <strong>{{course.properties.course_length}}</strong>mins<span class="np-details-label">To Complete</span>
        {% else %}
            <div>&nbsp;&nbsp;&nbsp;</div>
        {% endif %}
    </div>
</div>