As an alternative to checking the length of the string, you can also use the ISNUMBER formula:
=IF(AND(C1>=0,C1<5,ISNUMBER(C1)),A1,"")
Based on your most recent response, it looks like you do not want C1<5 to be a condition? Based on your original post, that's included, which is...