Hi @Morris Muthubi ,
I think this other post may help you: https://community.atlassian.com/t5/Jira-Questions/How-to-get-issue-count-using-JQL-in-jira/qaq-p/498188
What about a simple dashboard with two widgets
Maybe it is easier, and no api use involved..
have a look at this answer I gave yesterday:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.