Calculate total and accuracy ratio.