At least 50 people were killed in clashes with bandits in northwest Nigeria, which has been riven by cattle rustling and kidnapping, the state government says.