<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def namedb_get_num_historic_names_by_address( cur, address ):
 """ Get the number of names owned by an address throughout history """


    select_query = "SELECT COUNT(*) FROM name_records JOIN history ON name_records.name = history.history_id " + \
                   "WHERE history.creator_address = ?;"

    args = (address,)

    count = namedb_select_count_rows( cur, select_query, args )
    return count