For Non-Immigrant Visa, the permitted length of stay is up to 90 days from the date of arrival in Thailand. Travellers should carefully check the immigration stamps in their passports regarding the exact length of stay to ensure that they do not overstay their visa.
See more info here
Counting Days
Here is another app which might be helpful