analyzer: adds js function to check number of elements in json