Added RuleCollection to manager the Rules on Base
Fixed the parameter rule to array_search

Removed getArrayCopy() function on the function array_search
Implement Countable interface and fixed the tests

Implemented Countable interface to RuleCollection
Fixed some asserts of RuleCollection relationship
Merge pull request #6 from rheck/add-rule-collection

Added RuleCollection to manage the Rules on Base