Changed getCount() to static

getCount() method for RBObject and for all classes derived from it
should have been a static method. Changed them all to static.