A summary report created on a layout based on your Devation table would seem to be simplest to set up.Calculation fields from a related table could be use with aggregate functions such as sum, but that doesn't look like the best approach here.
Define a Count of type summary field in the deviation table and set it to "count" a field that is never empty so that it will count records for you.
Put a sub summary layout part on your layout, "when sorted by DeviationOrgin". Put the DevationOrigin and this summary field in this layout part.
Put a second sub summary layout part on your layout, "when sorted by DevationSubject". Put the DeviationSubject and this same summary field in this layout part.
Remove the body layout part.
Now you should have your report. Perform a find for the records you want in your report, then sort them first by Devation Origin, then by deviation subject. Use View as list to view this report and you should see the counts you've described here.
Many thanks for the directions, I appreaciate your help.