Check that the number of attributes and dimensions match.