title: Count of array values
body: <p>Need exact count of values in array.<br>
  My result is :</p>
  
  <pre><code>stdClass Object ( [employee] =&gt; ["1","2"] )
  </code></pre>
  
  <p>I want the count value as 2. Is it possible ?</p>
  
  <p>My laravel query :</p>
  
  <pre><code>$work = DB::table('workingdat')
              -&gt;select(DB::raw('employee'))
              -&gt;get();
              $work-&gt;toArray($work);
              print_r($work);
  </code></pre>
  
  <p>I was store JSON data in my table under the column employee.<br>
  Example : ["1","2"]</p>