function count_records_select and removal of { } from the there