Fix condition of getting interface class and added test for internal int...

...erface implementation of Countable