How to check how many objects are there in a layer?

Use the layer condition to restrict the object and then use the Count expression to get the number of object.
If you want to count all object on a layer, add them all to an object group and use it in the event.

This is not an answer to my question. I mean how would I know if a particular layer is empty or not?

So, rewrite your question as I precisely answered your question… :neutral_face:
By testing if the object count is = 0 after using the condition “myObject is on layer myLayer”.

What I mean is When we have instances, where there is list of all objects and their position and their Z-order is listed. Is there something similar which show which layer has what objects in it and which layer has nothing. why in the instances layer is not mention. And how would I know if I am not looking for any particular object, what if I don’t know which object to look for?

Ok ! You were talking about the scene editor (you need to be more precise). No, this is missing, we can add a column “Layer” to see instance’s layer.