count() parameter must be an array or an object that implements countable laravel
snippet in php

count() parameter must be an array or an object that implements countable laravel

user943

//add a typecast array to the array being called
$count = count((array)$originalArray);