def _count_table_rows(self, table_name):
cursor = self._db.cursor()<EOL>select_stmt = "<STR_LIT>" + table_name<EOL>try:<EOL><INDENT>cursor.execute(select_stmt)<EOL>row = cursor.fetchone()<EOL><DEDENT>except sqlite3.DatabaseError as e:<EOL><INDENT>msg = "<STR_LIT>" % str(e)<EOL>raise ArchiveError(cause=msg)<EOL><DEDENT>finally:<EOL><INDENT>cursor.close()<EOL><DEDENT>return row[<NUM_LIT:0>]<EOL>
Fetch the number of rows in a table