we have a requirement to show on ESS main page the number of requests waiting for approval and the number of requests requiring approval
It's not clear the difference between both values but regardless that, there are several ways to acomplish this.. from the old limited marquee and stored queries till where your imaginations takes you...
A simple one is add a caption having an input as variable and fill this variable as you wish in the format fc..
I have done this before and made a nice ticket status dashboard for the ESS initial page.
The counts of tickets were calculated in the login.DEFAULT formatctrl and stored in global variables. Then, any time the user submitted another ticket or approved a ticket, triggers would fire to update those global variables, so their counts would update within that same ESS session.
If an action was taken on one of their tickets by someone else, their session would not reflect that change, but since ESS sessions are relatively short we chose to not write code to handle such actions by others.