Added methods to matrices for getting the number of non-zero entries in a row / column, passes tests