With 5 children on a bench + 4 left over, the number of students must have a 4 or 9 as the last digit. But with 4 children on a bench + 3 left over, it's impossible for the last digit to be 4, so it must be 9. The smallest number that ends in a 9 that fulfills the conditions is 19.

01