Add methods numRows() and numCols()

@lileicc