The Catalan government said around 2.26 million cast a ballot in a referendum to leave Spain.