"F", "J", "M", "Q" Visa holders do not count days of presence towards substantial presence test for the period they are considered exempt individuals (For example: F-1 students are exempt from SPT rules for the first 5 years. The exemption applies once in a lifetime).
Important: Being deemed as an exempt individual does NOT mean that you do not need to pay taxes. All individuals with US income pay taxes to the relevant tax authorities and nobody is exempt from them.