bug-study-dataset-listing - fixed datasets var count

Also made a light-weight API JoinQueryExecuter for listing documents