So let me ask you this... Is your trouble that you want to see the apple count in rea-time or something or that you just want a report of instances with the apples... With the former, you could just make a label that updates that value on the game window, instead of having to do the console switchback... You could even make that label appear as a separate program running in tandem with the game... you could have a timer, just print off the value, every so often or called from some function events... I don't know, like, what are these apples anyways, are the just a variant you call in your script? Are the a scene you made with some nodes, or a node you made yourself or what? It's hard to advise on this...
You could use signals, so that when something happens here, or there it goes to a printout... using a singleton, you can access the value globally... I don't see why you have to keep typing apples, apples, or whatever. I mean, is this produce app? fruit ninja-like, or what?
i mean, Godot can access APIs and such, publishing real-time statistics, like Dogecoin and all that... limited only by your hardware. I doubt it is impossible to achieve you're goal here... just need to know more details so i can inform you. Godot is just endless with solutions accessible to non-programmers and professionals alike, and if Godot can't provide the functionality, there's usually a plugin or add-on whatever that can be used... and if that fails, there's always the potential to write it yourself, using the source code, and such... and it's totally free... good luck. and dont' get discouraged by this site, it's not the most helpful though, at times there are gems... I have some questions still posted here, unsolved...