fix "count" behavior