Here's First of all, a quick and dirty approach. Just add the following after your query:
approach similar to your post.
node(1);out ids;
This will add a one liner to your query result, regardless of whether there was some result or not.
<node id="1"/>
It shouldn't add too much overhead, after all.
There's one potential issue with that approach, though: if some mapper happens to delete that node #1, your marker is gone and you'll have to find some other available node. Of course, your normal query result also shouldn't produce a result, which looks like the marker, otherwise you cannot tell the both of them apart any longer.
Another approach, which is less of a hack, The **recommended approach** involves the use of `out count;`. In the following example, we will first print all the buildings in the current bbox, followed by a total count:
[bbox:{{bbox}}];
way[building];
out geom;
out count;
Assuming there are none, no buildings in your bbox, you will nevertheless still get the following summary information:
<count total="0" nodes="0" ways="0" relations="0" areas="0"/>