function getCellCount(table) {
  return table.cells ? table.cells.length :
                       table.rows[0].cells.length * table.rows.length;
}
Helper routine which returns the number of cells in the table.
@param {Element} table The table in question.
@return {number} Number of cells.
@suppress {strictMissingProperties} suppression added to enable type checking