added datasource methods and protocol for controlling selection count