Track days spent in New York State for the statutory residency test. If you maintain a permanent place of abode in New York State for substantially all of the taxable year and spend more than 183 days in the state, you may be considered a New York State resident for income tax purposes. Any part of a day generally counts as a day.
https://www.tax.ny.gov/pit/file/nonresident-faqs.htm
New York State Tax Residency
183-Day Statutory Residency Rule