wordpress JSONAPI introspector always limits number at 10?

I’m answering my own question because it might be useful to someone else sometime.

After reading through the somewhat sparse documentation on the wordpress plugin directory and getting nowhere. I found a variable in the JSON API code here’s how it works PS -1 just mean “all”:

$json_api->query->count=-1;
$posts = $json_api->introspector->get_posts(array('post_type' => array('post','tweet','gallery','video','music'), 'post_parent' => 0, 'order' => 'ASC', 'orderby' => 'date', 'numberposts' => 4));
echo count($posts);

you can set the count to whatever you want before making the api call.