How an I set the file upload limit for uploader.

Is there a way I can limit the number of files the user can upload?
For instance, I would like to let the user upload 3 files at a time, and if they select more than 3, pop up a message and prevent the uploading process.
this is the code snippet link https://snippet.webix.com/pzwhs2n6

I would like to let the user upload a total of 3 files. and if the uploader list contains more than 3 files then the user can get an alert message saying that “Limit reached”, and prevent the uploading process and also if the list contains 3 files, the user wants to replace one file with another file by removing that file and able to upload only one more file. This is the code snippet link Code Snippet.
Thank you in advance.

check this
https://snippet.webix.com/9o06wysa