JSFiddle - React, Tailwind, and code Playground

JavaScript

function count (obj) {
    var count = 0;
    for(var key in obj){
        count++;
    }
    return count;
}