Count the rows in the table, or count all the elements in the table if $mode = 1.
This function has no parameters.