There are two ways to calculate:
1- If you arrived after Sunset, then the calculation starts from the dawn of next day, till the sun set of the tenth day. Hence, if you will travel before the Sunset, it is less than ten days.
2- If you arrived after dawn, as it is in your example, at 9 am of 31St of May, then the ten days will complete by 9 am of June 10Th.