Dimension of representation and character varieties for two- and three- orbifolds