We have 500 storys and for each story link with multiple bugs,
How to find out, how many bugs in each story in JQL, please suggest here.
I understand you want to view the number of linked issues for each of your stories? This isn't possible in JQL, as JQL is for selecting issues, and can't in itself do any aggregations or the like. You may need to export your data to an external system, or consider solutions from the Atlassian Marketplace.
Edit: Another solution could be to calculate the number of linked issues and write it to a custom field, e.g. using Jira Automation.
As an example from the Marketplace, you can easily view this information in the app that my team is working on, JXL for Jira. JXL is a full-fledged spreadsheet/table view for your issues that allows viewing all issue fields, plus a number of "special fields" that aren't natively available. These "special fields" include the number of linked issues:
As you can see above, you easily sort and filter by the number of linked issues, and also perform advanced operations such as grouping, sum-ups, or conditional formatting. You can also export to Excel or CSV if needed.
Hope this helps,