added method task count, fixed method get tasks