fix count when the key is an attribute written in dot notation