fixed bug wrt counting on predefined scopes