Hi @JoEllen_Carter!
In JavaScript, you could add a check for link.outwardIssue.fields.issuetype.name == "Bug"
(or similarly for the inward issue type link.inwardIssue.fields.issuetype.name == "Bug"
).
However, counting only bugs is described in my second reply above; if there can be several link types for the bug dimension, you can also specify them in the advanced settings. See this post: Linked bugs and multiple types of links.
Lauma / support@eazybi.com