Please suggest an alternative option to use the below-mentioned JQL to get the count of issues/story points and so on.
issueFunction in aggregateExpression("Total Estimate for all Issues", "originalEstimate.sum()", "Time Spent", "timespent.sum()", "Remaining work", "remainingEstimate.sum()", "Total story points for all Issues", "storyPoints.sum()")
P.S. I also have access to ScriptRunner Enhanced Search