The number of words is not the crucial issue. This is a useful exercise because it shows you whether or not the text has drama and is illustratable. Granted, it might be a bit tougher to sell a story that is especially long or short, but it is even tougher, if not impossible, to sell a book that has been padded or chopped for the sake of hitting a preselected length. A book can be shorter than Sarah, Plain and Tall ,or longer than Hitty, Her First Hundred Years .
Some publishers have series of books with a maximum of pages.
For example, Hyperion chapter book manuscripts must currently be 2,500-5,000 words maximum. Not unless you are a professional artist. Whether it is right or not, the industry believes that only a rank amateur submits someone else's art with a picture-book manuscript. A few rare folks have done this and succeeded, but most have not. If a publisher accepts your manuscript, your editor will choose the illustrator.