There are 3 parts in your question.
To answer your question title "dynamically creating edit text box in matlab guide" I would advise to use Slayton's solution and create a new figure with your n edit text boxes prompting. If you really want it in your initial guide figure, the other solution would be to initially disable them/make them invisible. Then in the callback function of your input import function you can decide how many edit text boxes you want to enable.
To answer your question
I was wondering if we can determine the number of edit text boxes in matlab guide during the run-time?
During the run-time, you can count all the text boxes in the "handles" structure this way:
hCell=struct2cell(handles);
a=0;
for i=1:length(hCell)
if strcmp(get(hCell{i},'Type'),'uicontrol')
if strcmp(get(hCell{i},'Style'),'edit')
a=a+1;
end
end
end
a%number of edit boxes
You should ask one "if" more if in your "handles" structure you have a non-handle...
Concerning the last part of your message, I don't understand:
I won't to generate a number of edit text boxes.