hacky to get count of records,extra query