Implement Countable interface and fixed the tests

Implemented Countable interface to RuleCollection
Fixed some asserts of RuleCollection relationship