An official says the death toll from a stampede at a train station in northern India is now 31.