binCounts function

Count values in given bins