count_vals_inrows_byname function

Count the number of matrix entries in rows that meet a criterion