The article proposes new tests for the number of unit roots in vector autoregressive models based on the eigenvalues of the companion matrix. Both stationary and explosive alternatives are considered. The limiting distributions of test statistics depend only on the number of unit roots. Size and power are investigated, and it is found that the new test against some stationary alternatives compares favourably with the widely used likelihood ratio test for the cointegrating rank. The powers are prominently higher against explosive than stationary alternatives. Some empirical examples are provided to show how to use the new tests with real data.