add single-select-count endpoint

fixes #268