value-count method

* in service of k nearest neighbor