Fixed the count issue of the class