Fix condition of getting interface class and added test for internal interface implementation of Countable
Migrating PHP code to namespaces