Limit the number of placed actors on the level

With editor i mean something like this.

299110-ezgifcom-video-to-gif.gif

As you can see on the gif i can place many walls but is there a way to limit this?
Sorry for the confusion.