The length depends on the topic, for a concise "cover everything" course may be a bit on the longer side. Not sure what you are teaching, so I'm making up a topic to show the steps in how I base my course length. Also, quality > quantity is always better!
Let's say you were going to teach "Novel Writing: Everything Needed to Get Published."
1) Search Udemy for this topic:
2) Look at all courses on pg 1 (possibly 2) especially pay attention to the best seller and highest rated courses.
3) Write down the total hours of courses most like yours, ignoring a course called "Writing Book Reviews of Novels" to see what direct competitors are offering.
4) Rough average here of the top 6 closest to your course = 5.75 hours, but the highest-rated is 7 hours, and best seller is 9 hours, so that students may be looking for longer courses than average.
5) My advice would be to create a How to Write a Novel course that is 7. The shortest I would create in this field would be 6, and the longest would be 10 at the very most.
This is very general advice so if you are Mark Twain, you could be a best seller with a 2-hour course if your course is more unique with little competition you could do great with 90-minutes and if you teach a more competitive topic 10 hours may be the absolute minium.
I hope this was helpful- good luck in launching your first online course on Udemy!
Alicia Paz M.A, QMHP