title: Get the length of the Observable
body: <pre><code>export class AppComponent { 
  
    posts: any[];
    requestStream: any;
  
      constructor(http: Http){  
         http.get('https://api.github.com/users')
           .subscribe(  
           response =&gt; { this.posts = response.json(); });  
      }  
  }
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>&lt;div *ngFor="let post of posts"&gt;
  {{ post.login }}
  &lt;/div&gt;
  {{ posts.length }}
  </code></pre>
  
  <p>The view shows everything well - login of every post and the length of posts (which is 30), but console gives error:</p>
  
  <blockquote>
    <p>Cannot read property 'length' of undefined</p>
  </blockquote>
  
  <p>And other concern is that that url (<a href="https://api.github.com/users" rel="nofollow noreferrer">https://api.github.com/users</a>) actually consists of more records than 30 (46). So why I get only 30 records? </p>