Added train count method