Till the end. I don't remember the source, but I read it somewhere in YouTube itself.
Update: According to this page in YouTube support, it's not that simple.
Prior to 200-300 views, view count on the watch page acts as a real time hit counter. Each visit to that page, regardless of who is visiting (even the video owner) increases the view count by 1 (but see the secondary system below).
After 300 views, the whole system changes; the secondary view counters kick in. YouTube has never said exactly what they're counting (or not) but it's known that they throw out the original hit counter and re-evaluate all the page views and only allows hits which YouTube calls a "view".