A PDF file has pages, just like a book, so you can count them. You have to read it page by page, just like a book. While this works great for a big screen, and is nice when it comes time to print, the format is very inflexible when it comes to viewing it on smaller devices, or if you want the text bigger, smaller, etc.
Most other ebook formats do not have pages. Instead the text can be reformatted to be read on many types of devices, at many font sizes, etc. It makes for a very flexible format. But the result is that there are no absolute pages, they depend on what font size, screen size, or other formatting you have set in your reader.
To the best of my knowledge there is no standard way to judge the length of an ebook.
You can look at the file size, but this can vary a lot if there are illustrations or other extra features in the book.
I've noticed that some books show Print Length in their description in both the iBooks Store and in the
Amazon Kindle store. Of course, you are left wondering whether the number of pages refers to a paperback, hardback, small print, etc., but it should give you a rough idea of how long the book is.
Or you can just look up the paper version online for a description. Very few books are ebook only, so far.