The desired number is the difference between the number of messages sent by the 16th day and the number sent by the 9th day:
... n = t(16) - t(9)
... n = (40×√16) - (40×√9)
... n = 40×(4 - 3) = 40
40 text messages were sent between the ninth and sixteenth day of the month.