This depends on your style guide. If you're following APA, all of your examples look good to me. My reasoning:
- I bought nine apples: The number is under 10 and no special rules apply.
- We need 5 mL acid for this reaction: It is written before a "unit of measurement", so it is written as a number.
- Jack, you already did it three times!: The number is under 10 and no special rules apply.
- It has been five months since she left me: This looks like an "approximate unit of time", so it's written as a word.
Here's what APA says:
Use numbers to express:
a. numbers 10 and above
b. numbers in the abstract of a paper or in a graphical display within a paper
c. numbers that immediately precede a unit of measurement
d. numbers that represent statistical or mathematical functions, fractional or decimal quantities, percentages, ratios, and percentiles and quartiles
e. numbers that represent time[*], dates, ages, scores and points on a scale, exact sums of money
f. numbers that denote a specific place in a numbered series, parts of books and tables, and each number in a list of four or more numbers
Use words to express:
a. any number that begins a sentence, title, or test heading
b. common fractions [one-fifth of the class; two-thirds majority]
c. universally accepted usage [the Twelve Apostles; Five Pillars of Islam]
(I got this list from here, which unfortunately forces you to download it.)
[*] The APA Blog clarifies here that for "approximate units of time" you should use words.