count datapoints API