Rename 'template' and 'count' to 'key' and 'value'