give different results are usually due to presence of duplicate structures in datasets
http://apps.ideaconsult.net:8080/ambit2/query/ncompound_value?dataset_uri=http://apps.ideaconsult.net:8080/ambit2/dataset/616076&feature_uris\[]=http://apps.ideaconsult.net:8080/ambit2/feature/21853
gives NO(39) and YES(37). The dataset contains, however, 87 compounds, all of which have a feature values for feature 21853.