fastened the calculation of the total number of rows

Signed-off-by: Malte Sussdorff <malte.sussdorff@cognovis.com>
Merge branch 'master' of github.com:cognovis/intranet-invoices