In this case, an object is anything you can Use Object on
The DMG says:
For the purpose of these rules, an object is a discrete, inanimate item like a window, door, sword, book, table, chair, or stone, not a building or a vehicle that is composed of many other objects.
We are told an object is discrete and inanimate. "Inanimate" means that it is not a creature, which separates it from other fundamental game entities that interact with the rules in characteristic ways (objects, creatures, spell effects, dungeon hazards, etc.)
"Discrete" means that it can easily be recognized as separate from the environment and separate from other objects - which is where the complications begin.
Is a weapon an object?
We are told that an object is an item, "like" a window, door, sword, book, table, chair, or stone. Thus, the DMG says a sword is an object, but it also says objects are not composed of many other objects. A sword has at least three parts (blade, crosspiece, pommel) which were joined together by a smith. When the smith was handling these items they were each separate objects, but once joined together they became one object, the sword.
Is an armor an object?
The heat metal spell allows you to (emphases mine):
Choose a manufactured metal object, such as a metal weapon or a suit of heavy...metal armor, that you can see within range. You cause the object to glow red-hot. Any creature in physical contact with the object takes 2d8 fire damage when you cast the spell.
So yes, when targeted by a heat metal spell, a suit of armor is an object. And yet, real world plate armors consisted of at least twenty individual pieces which were each put on separately, which is why it takes so long to don and doff the armor. We also know that at least some of these pieces, such as the gauntlets and helmet, can be considered objects in their own right, since once you acquire magic versions of these (such as gauntlets of ogre power or a helm of brilliance) you can remove the normal pieces of your armor and switch in magic ones. So, if I am wearing a suit of armor, it is one object, targetable by a heat metal spell. But if I take off the helm and gauntlets and set them on the table next to me, the suit of armor then consists of four, separate and discrete, objects - any one of which - but only one of which - could be targeted by the spell.
PC's most typically interact with objects by using them as you are asking about ("Use an Object" Action, but also "Interacting with Objects around you" sidebar on PHB 190) or attempting to damage them ("Statistics for Objects" DMG 246). However, there are many more obscure possibilities, such as those of a 17th level Knowledge Domain Cleric performing an 'Object Reading' to "see visions of the object’s previous owner" (PHB 59). Whether or not something is an object itself, or is merely a part of another object, or is something itself composed of other objects, depends on the context in which the PC's are interacting with it. An object is some thing with which a game entity interacts. This is a functional definition rather than a categorical or linguistic one.
For example, if a party was attempting to get through a locked door quickly, the barbarian might attack the door itself, in which case the entire door would be considered an object he was damaging. But if they were instead trying to get through the door quietly, then the rogue might work at the lock while the artificer tried to disassemble the hinges. In this case the door would not be an object, but a collection of other objects, and the lock and hinges would be the objects with which the PC's were interacting.
As it turns out, the things that surround the PC's are in a sense Schrödinger entities: they are simultaneously objects and not-objects until the point in time when a creature or spell interacts with them, and then they become fixed as objects, at least for the duration of the interaction.
Ultimately, this goes all the way back to the First Three Rules about how the game is played. A player should not be asking "How many Objects do I see in the room?" or "What here can I do my Use an Object Action on?"
Rather, the DM describes the environment in narrative, naturalistic terms - not as a list of game mechanics entities.
The player responds with what they would like their character to do.
The DM narrates the results of those actions, perhaps noting whether it was a Use an Object Action, a free Object Interaction, or something else, as well as what Object was affected. The same thing the DM is calling "an object" now might not be one later, depending on how the characters later interact with it. For example:
PC1: "I hold my spellbook while I ritually cast my spell."
[PC1 is using the Cast A Spell action - and it doesn't matter whether the book is an object or not.]
PC2: "I knock the book PC1 is holding from their hands with my staff, rip out a page, and flee."
[The DM has PC2 make a Disarm attack, and treats the entire book as a single object, the target of that attack. PC2 is successful. When they attempt to tear out a page, though, the book becomes a collection of objects, with multiple sheets of parchment, many fibre cords or leather thongs, and two separate wooden boards. PC2 now uses their free Object Interaction to grab one of those objects, a single page, without applying the rules for damaging an object.]
PC3: "I shoot a firebolt at the page PC2 is holding."
[Here the page is a single object, targeted by the spell, and we are applying the damage to objects rule.]
An object exists at the scale of a game interaction, at the time that interaction occurs.