The issue is whether someone can use the mark “Five Apples” if “5 Apples” is trademarked. I’ll suppose the intended meaning of “trademarked” is Federally registered in the US.
If the marks are for the same goods or services, then the second (later in time) user is at a disadvantage. Because these marks sound the same when spoken out loud and have the same meaning, the marks may be viewed as essentially the same in the eyes of a consumer, or in the eyes of a court. But it’s never that easy to answer these questions even when one has all the facts.
Whoever starts using the same or a confusingly similar mark first and continually uses it (or has an excuse for a break in use) typically has superior rights. An inexcusable break in use could be viewed as abandonment.
The type of use and the geographic presence of such use are also relevant.
Is the registration valid? Does it have a problem making it void? Are there underlying rights beyond those provided by the registration?
The answers to each of these questions have nuances to them based on statutes and court decisions, and sometimes there will be an issue a court has trouble deciding.
If you have trademark rights to protect, hire an experienced trademark lawyer. If you are thinking of adopting a new mark, hire an experienced trademark lawyer. There is no perfect answer in many cases, but a good lawyer will help you make the tough decisions you’ll need to hopefully (using a boxing metaphor) “bob and weave” and avoid getting “hit.”