def db_row_count(cursor, schema_table):

    """

    :param cursor: Postgres formatted database connection string
    :type cursor: psycopg2.cursor
    :param schema_table: schema.table
    :type schema_table: str|unicode

    :return: number of rows in the specified schema.table
    :rtype: int
    """

    query = """SELECT COUNT(1) FROM %s;""" % schema_table
    cursor.execute(query)
    result = cursor.fetchall()

    return int(result[0][0])