Renamed count to countSubstr, implemented Countable interface