256. AL is incremented 1 in each iteration and after 256 increments, it becomes 0 again as AL register is 8 bits.
When AL=0000 0000 and CY=1, JNZ will be false. JNZ means jump when previous operation set Zero flag and not jump when previous operation did not set zero flag. So control comes out of loop after 256 iterations.