add_rowcounts function

Layout-creating function to add row total counts