Added support for datalayer.ResultSet to return total number of matching records.