@classmethod<EOL><INDENT>@coroutine<EOL>@cursor<EOL>def count(cls, cur, table:str, where_keys: list=None):<DEDENT>
if where_keys:<EOL><INDENT>where_clause, values = cls._get_where_clause_with_values(where_keys)<EOL>query = cls._count_query_where.format(table, where_clause)<EOL>q, t = query, values<EOL><DEDENT>else:<EOL><INDENT>query = cls._count_query.format(table)<EOL>q, t = query, ()<EOL><DEDENT>yield from cur.execute(q, t)<EOL>result = yield from cur.fetchone()<EOL>return int(result[<NUM_LIT:0>])<EOL>
gives the number of records in the table

Args:
    table: a string indicating the name of the table

Returns:
    an integer indicating the number of records in the table