It depends.
New York taxes nonresidents and part-year residents on any income derived from New York sources. Since your spouse was working from Illinois but for the New York based company, his income would still be considered to be from New York sources.
The number of days is used for determining credit amounts so just use your best estimate of the number of days worked outside of New York. Be sure to retain support with your tax documents for how you arrived at the number of days if the taxing authorities request support.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"