ruby: use new count API