MT#5879 Count total separately.

From now total counted separately, as for using totals on the
title page, titlepage is generated the last. Now title page also shows data,
so for case when total is on the next page - it will be without title
values added.