Add count query for synonym table.