count keys respectively