Update Heading count to be count of defined headings

This is because the course_sections table never actually removes
sections that is defined e.g. sections that are hidden are never removed
so if the setting for course sections changes to 99 and back to 20 then
there would still be 99 rows. Now it counts the sections with user
defined headings instead.