get count from sql instead of AddValue