add counter on the resultset