fix bug that counts method declare as method definition
simple support for Class definition