correctly calculate number of courses

refs #87